📄 addl.s
字号:
add_l_imm32_to_predec: ; pre-decrement from register to mem set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l #xx:32, @-erd mov.l #long_dst+4, er1 add.l #0xcafedead:32, @-er1 ; Imm32, register pre-decr operands;;; .word 0x010e;;; .word 0xb118;;; .long 0xcafedead ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x526421ce, @long_dst beq .Lnext25 fail.Lnext25: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_imm32_to_disp2: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l #xx:32, @(dd:2, erd) mov.l #long_dst-12, er1 add.l #0xcafedead:32, @(12:2, er1) ; Imm32, reg plus 2-bit disp. operand;;; .word 0x010e;;; .word 0x3118;;; .long 0xcafedead ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst-12, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x526421ce, @long_dst beq .Lnext26 fail.Lnext26: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_imm32_to_disp16: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l #xx:32, @(dd:16, erd) mov.l #long_dst-4, er1 add.l #0xcafedead:32, @(4:16, er1) ; Register plus 16-bit disp. operand;;; .word 0x010e;;; .word 0xc118;;; .long 0xcafedead;;; .word 0x0004 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst-4, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x526421ce, @long_dst beq .Lnext27 fail.Lnext27: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_imm32_to_disp32: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l #xx:32, @(dd:32, erd) mov.l #long_dst-8, er1 add.l #0xcafedead:32, @(8:32, er1) ; Register plus 32-bit disp. operand;;; .word 0x010e;;; .word 0xc918;;; .long 0xcafedead;;; .long 8 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst-8, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x526421ce, @long_dst beq .Lnext28 fail.Lnext28: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_imm32_to_abs16: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l #xx:32, @aa:16 add.l #0xcafedead:32, @long_dst:16 ; 16-bit address-direct operand;;; .word 0x010e;;; .word 0x4018;;; .long 0xcafedead;;; .word @long_dst ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed test_gr_a5a5 1 ; (first, because on h8/300 we must use one test_gr_a5a5 2 ; to examine the destination memory). test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x526421ce, @long_dst beq .Lnext29 fail.Lnext29: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_imm32_to_abs32: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l #xx:32, @aa:32 add.l #0xcafedead:32, @long_dst:32 ; 32-bit address-direct operand;;; .word 0x010e;;; .word 0x4818;;; .long 0xcafedead;;; .long @long_dst ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed test_gr_a5a5 1 ; (first, because on h8/300 we must use one test_gr_a5a5 2 ; to examine the destination memory). test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x526421ce, @long_dst beq .Lnext30 fail.Lnext30: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use..endif ;; ;; Add long from register source ;; add_l_reg32_to_reg32: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, erd mov.l #0x12345678, er1 add.l er1, er0 ; Register 32-bit operand;;; .word 0x0a90 ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 test_neg_set test_zero_clear test_ovf_clear test_carry_clear test_h_gr32 0xb7d9fc1d er0 ; add result test_h_gr32 0x12345678 er1 ; add src unchanged test_gr_a5a5 2 ; Make sure other general regs not disturbed test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7.if (sim_cpu == h8sx)add_l_reg32_to_indirect: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @erd mov.l #long_dst, er1 add.l er0, @er1 ; Register indirect operand;;; .word 0x0109;;; .word 0x0110 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext44 fail.Lnext44: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_postinc: ; post-increment from register to mem set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @erd+ mov.l #long_dst, er1 add.l er0, @er1+ ; Register post-incr operand;;; .word 0x0109;;; .word 0x8110 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst+4, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext49 fail.Lnext49: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_postdec: ; post-decrement from register to mem set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @erd- mov.l #long_dst, er1 add.l er0, @er1- ; Register post-decr operand;;; .word 0x0109;;; .word 0xa110 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst-4, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext50 fail.Lnext50: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_preinc: ; pre-increment from register to mem set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @+erd mov.l #long_dst-4, er1 add.l er0, @+er1 ; Register pre-incr operand;;; .word 0x0109;;; .word 0x9110 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext51 fail.Lnext51: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_predec: ; pre-decrement from register to mem set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @-erd mov.l #long_dst+4, er1 add.l er0, @-er1 ; Register pre-decr operand;;; .word 0x0109;;; .word 0xb110 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext48 fail.Lnext48: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_disp2: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @(dd:2, erd) mov.l #long_dst-12, er1 add.l er0, @(12:2, er1) ; Register plus 2-bit disp. operand;;; .word 0x0109;;; .word 0x3110 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure other general regs not disturbed test_h_gr32 long_dst-12, er1 test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext52 fail.Lnext52: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_disp16: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @(dd:16, erd) mov.l #long_dst-4, er1 add.l er0, @(4:16, er1) ; Register plus 16-bit disp. operand;;; .word 0x0109;;; .word 0xc110;;; .word 0x0004 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_h_gr32 long_dst-4, er1 test_gr_a5a5 0 ; Make sure other general regs not disturbed test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext45 fail.Lnext45: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_disp32: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @(dd:32, erd) mov.l #long_dst-8, er1 add.l er0, @(8:32, er1) ; Register plus 32-bit disp. operand;;; .word 0x0109;;; .word 0xc910;;; .long 8 ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_h_gr32 long_dst-8, er1 test_gr_a5a5 0 ; Make sure other general regs not disturbed test_gr_a5a5 2 test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext46 fail.Lnext46: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_abs16: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @aa:16 add.l er0, @long_dst:16 ; 16-bit address-direct operand;;; .word 0x0109;;; .word 0x4110;;; .word @long_dst ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed test_gr_a5a5 1 ; (first, because on h8/300 we must use one test_gr_a5a5 2 ; to examine the destination memory). test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext41 fail.Lnext41: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use.add_l_reg32_to_abs32: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l ers, @aa:32 add.l er0, @long_dst:32 ; 32-bit address-direct operand;;; .word 0x0109;;; .word 0x4910;;; .long @long_dst ;; test ccr ; H=0 N=0 Z=0 V=1 C=1 test_neg_clear test_zero_clear test_ovf_set test_carry_set test_gr_a5a5 0 ; Make sure _ALL_ general regs not disturbed test_gr_a5a5 1 ; (first, because on h8/300 we must use one test_gr_a5a5 2 ; to examine the destination memory). test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7 ;; Now check the result of the move to memory. cmp.l #0x2d0ae8c6, @long_dst beq .Lnext42 fail.Lnext42: mov.l #0x87654321, @long_dst ; Re-initialize it for the next use. ;; ;; Add long to register destination. ;; add_l_indirect_to_reg32: set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l @ers, Rd mov.l #long_src, er1 add.l @er1, er0 ; Register indirect operand;;; .word 0x010a;;; .word 0x0110 ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 test_neg_set test_zero_clear test_ovf_clear test_carry_clear test_h_gr32 0xb7d9fc1d er0 test_h_gr32 long_src, er1 test_gr_a5a5 2 ; Make sure other general regs not disturbed test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7add_l_postinc_to_reg32: ; post-increment from mem to register set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l @ers+, erd mov.l #long_src, er1 add.l @er1+, er0 ; Register post-incr operand;;; .word 0x010a;;; .word 0x8110 ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 test_neg_set test_zero_clear test_ovf_clear test_carry_clear test_h_gr32 0xb7d9fc1d er0 test_h_gr32 long_src+4, er1 test_gr_a5a5 2 ; Make sure other general regs not disturbed test_gr_a5a5 3 test_gr_a5a5 4 test_gr_a5a5 5 test_gr_a5a5 6 test_gr_a5a5 7add_l_postdec_to_reg32: ; post-decrement from mem to register set_grs_a5a5 ; Fill all general regs with a fixed pattern set_ccr_zero ;; add.l @ers-, erd mov.l #long_src, er1 add.l @er1-, er0 ; Register post-decr operand;;; .word 0x010a;;; .word 0xa110 ;; test ccr ; H=0 N=1 Z=0 V=0 C=0 test_neg_set
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -