[coreboot-gerrit] Patch merged into coreboot/master: db0e0e2 amd/agesa/*/gcc-intrin.h: Invaild inline asm

gerrit at coreboot.org gerrit at coreboot.org
Wed May 21 21:40:57 CEST 2014


the following patch was just integrated into master:
commit db0e0e2c54397dffa8b55bfbfb76a15d641e4235
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Thu May 15 21:13:33 2014 +1000

    amd/agesa/*/gcc-intrin.h: Invaild inline asm
    
    The 'm' (a memory reference) constraint makes little sense here since we
    are talking about a fs relative read, rather 'ir' (immediate or
    register) constraint is more sensible.
    
    N.B. The 'p' constraint allows anything which fits the form of an address
    calculation where the 'ir' constraint is just a register /xor/
    immediate. Hence would produce better code here however, unfortunately,
    clang does not currently support it properly.
    
    The %b and %w constraints are also redundant and only hide errors.
    
    The functions writefsword() and writefsdword() should use ir instead of
    iq. iq is unnecessarily restrictive (it is only required for writing
    bytes).
    
    The cld in stosb is redundant (and the constraints are unnecessarily
    complicated). Note that The ABI guarantees that the direction flag is
    cleared. i.e. eax, ecx, edx are caller-saved, returned value in eax,
    eax+edx, st0, yaddayadda, direction flag cleared. In fact bad things can
    happen if you set it in some asm and do not clear it until the end of
    the asm.
    
    Line wrap these extraneously long lines found with these particular functions.
    
    Many thanks to Christoph Mallon <christoph.mallon at gmx.de> from #llvm for
    helping me with this.
    
    Change-Id: Iaf3ad65791640e1060a2029e7ebb043f57b338a9
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
    Reviewed-on: http://review.coreboot.org/5758
    Tested-by: build bot (Jenkins)
    Reviewed-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
    Reviewed-by: Marc Jones <marc.jones at se-eng.com>


See http://review.coreboot.org/5758 for details.

-gerrit



More information about the coreboot-gerrit mailing list