1 ! Copyright (C) 2007 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays generator generator.fixup kernel sequences words
4 namespaces math math.bitfields cpu.arm.assembler ;
9 GENERIC# (BX) 1 ( Rm l -- )
11 M: register (BX) ( Rm l -- )
23 M: word (BX) 0 swap (BX) rc-relative-arm-3 rel-word ;
25 M: label (BX) 0 swap (BX) rc-relative-arm-3 label-fixup ;
27 M: arm5-variant BX 0 (BX) ;
29 M: arm5-variant BLX 1 (BX) ;
31 ! More load and store instructions
32 GENERIC: addressing-mode-3 ( addressing-mode -- n )
34 : b>n/n ( b -- n n ) dup -4 shift swap HEX: f bitand ;
36 M: addressing addressing-mode-3
40 delegate addressing-mode-3
41 { 0 21 23 24 } bitfield ;
43 M: integer addressing-mode-3
53 M: object addressing-mode-3
61 : addr3 ( Rn Rd addressing-mode h l s -- )
66 { addressing-mode-3 0 }