Author: wmb Date: Thu Mar 3 19:32:13 2011 New Revision: 2177 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2177
Log: ARM assembler - Changed the "[ifdef] armv7" guarding the use of the movw instruction in (set) to a runtime value "use-movw?" (default value false), so the system can be compiled to run anywhere, but it can later generate architecture-specific code for special purposes.
Modified: cpu/arm/assem.fth
Modified: cpu/arm/assem.fth ============================================================================== --- cpu/arm/assem.fth Thu Mar 3 07:14:41 2011 (r2176) +++ cpu/arm/assem.fth Thu Mar 3 19:32:13 2011 (r2177) @@ -44,6 +44,8 @@ defer asm-set-relocation-bit
also arm-assembler definitions +false value use-movw? + : asm, ( n -- ) here /l asm-allot asm! ; previous definitions
@@ -1162,15 +1164,15 @@ true asm-const ( reg# op ) then else ( reg# imm imm ) -[ifdef] armv7 - 0 1.0000 within if ( reg# imm ) - set-imm16 0300.0000 ( reg# op ) \ movw rN,#<imm16> - else ( reg# imm ) - false asm-const ( reg# op ) - then -[else] - drop false asm-const ( reg# op ) -[then] + use-movw? if ( reg# imm imm ) + 1.0000 u< if ( reg# imm ) + set-imm16 0300.0000 ( reg# op ) \ movw rN,#<imm16> + else ( reg# imm ) + false asm-const ( reg# op ) + then ( reg# op ) + else ( reg# imm imm ) + drop false asm-const ( reg# op ) + then ( reg# op ) then ( reg# op ) then ( reg# op ) iop rd-field !op
openfirmware@openfirmware.info