[openfirmware] [commit] r2157 - in cpu/arm: . build

repository service svn at openfirmware.info
Thu Jan 27 20:05:18 CET 2011


Author: tooch
Date: Thu Jan 27 20:05:17 2011
New Revision: 2157
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2157

Log:
Add pld{w} to ARM assembler. One more arm/build/Makefile tweak.

Modified:
   cpu/arm/assem.fth
   cpu/arm/build/Makefile
   cpu/arm/disassem.fth

Modified: cpu/arm/assem.fth
==============================================================================
--- cpu/arm/assem.fth	Thu Jan 27 02:22:27 2011	(r2156)
+++ cpu/arm/assem.fth	Thu Jan 27 20:05:17 2011	(r2157)
@@ -681,6 +681,12 @@
 
 : amode-lsr  ( -- )  init-operands   (amode-ls)  {!}  !op  ;
 
+: amode-pld  ( -- )
+   \ Like amode-ls and friends except r16 vice r12.
+   0080.0000 iop
+   ['] get-off12  get-ea  !op
+;
+
 : get-off8  ( -- )
    \ Get the offset for [ldr|str][h\sh\sb] instructions.
    get-whatever case
@@ -835,6 +841,7 @@
    d# 28 set-field		\ put the condition code in.
 ;
 : {cond/s}  ( opcode -- )  {cond} {s}  ;
+: {uncond}  ( opcode -- )  is newword  ;
 
 : parse-inc  ( l-flag -- )
    \ Parse the increment tag for ldm and stm.  There MUST be a two letter
@@ -864,11 +871,14 @@
    set-parse  rem$ lower    ( )
 
    5 ?match  if  execute exit  then
+   4 ?match  if  execute exit  then
    3 ?match  if  execute exit  then
 
    \ Don't try a 2-character match if the string length is 3, because,
    \ for example, "blt" (i.e. b{lt}) would then match "bl" instead of "b".
-   rem-len 3 <>  if  2 ?match  if  execute  then  then
+   rem-len 3 <>  if
+      2 ?match  if  execute exit  then
+   then
 
    1 ?match  if  execute exit  then
 
@@ -1043,6 +1053,9 @@
 : dmb  ( -- )  h# f57ff050 asm,  ;
 : isb  ( -- )  h# f57ff060 asm,  ;
 
+: pld   ( -- )  h# f550.f000 {uncond} amode-pld  ;
+: pldw  ( -- )  h# f510.f000 {uncond} amode-pld  ;
+
 : #    ( -- adt-immed )  adt-immed  ;
 : reg  ( -- adt-reg )  adt-reg  ;
 

Modified: cpu/arm/build/Makefile
==============================================================================
--- cpu/arm/build/Makefile	Thu Jan 27 02:22:27 2011	(r2156)
+++ cpu/arm/build/Makefile	Thu Jan 27 20:05:17 2011	(r2157)
@@ -1,8 +1,8 @@
-BASEDIR= `(cd ../../../; pwd;)`
+BASEDIR= $(shell cd ../../../; pwd)
 
 OS := $(shell uname)
 HOSTCPU= $(shell ${BASEDIR}/forth/lib/hostcpu.sh)
-HOSTDIR= ../../${HOSTCPU}/${OS}
+HOSTDIR= ${BASEDIR}/cpu/${HOSTCPU}/${OS}
 BUILDSH= ${BASEDIR}/forth/lib/build.sh
 
 all: basefw.dic
@@ -20,9 +20,6 @@
 build: ${HOSTDIR}/forth ${HOSTDIR}/armforth
 	@ln -sf ${BUILDSH} build
 
-# build: ../${OS}/forth
-# 	@ln -sf ../${OS}/forth $@
-
 %.dic: FORCE build
 	./build $@
 
@@ -35,4 +32,5 @@
 
 # Don't use *.dic so as not to remove builder.dic
 clean:
-	rm -f tools.dic kernel.dic basefw.dic *.log headers *~ inflate.bin build
+	rm -f tools.dic kernel.dic basefw.dic *.log headers *~ inflate.bin build *.tag
+

Modified: cpu/arm/disassem.fth
==============================================================================
--- cpu/arm/disassem.fth	Thu Jan 27 02:22:27 2011	(r2156)
+++ cpu/arm/disassem.fth	Thu Jan 27 20:05:17 2011	(r2157)
@@ -441,6 +441,11 @@
    ['] .ldc/stc compile,  \ 6
    ['] .coproc  compile,  \ 7
 
+: .pld  ( -- )
+   d#22 bit?  if  ." pld"  else  ." pldw"  then
+   op-col .[ .rn ,.addr-mode .] 
+;
+
 : uncond-op   ( -- op  )  d#  4  bit?  ;
 : uncond-op1  ( -- op1 )  d# 20 8bits  ;
 : uncond-op2  ( -- op2 )  d#  4 4bits  ;
@@ -452,6 +457,10 @@
       5 of ." dmb" endof
       6 of ." isb" endof
       endcase endof
+   h# 51 of  .pld  endof
+   h# 55 of  .pld  endof
+   h# 59 of  .pld  endof
+   h# 5d of  .pld  endof
    ." ?"
    endcase
 ;



More information about the openfirmware mailing list