orl.s 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Hitachi H8 testcase 'or.l'
  2. # mach(): h8300h h8300s h8sx
  3. # as(h8300): --defsym sim_cpu=0
  4. # as(h8300h): --defsym sim_cpu=1
  5. # as(h8300s): --defsym sim_cpu=2
  6. # as(h8sx): --defsym sim_cpu=3
  7. # ld(h8300h): -m h8300helf
  8. # ld(h8300s): -m h8300self
  9. # ld(h8sx): -m h8300sxelf
  10. .include "testutils.inc"
  11. start
  12. .if (sim_cpu == h8sx) ; 16-bit immediate is only available on sx.
  13. or_l_imm16:
  14. set_grs_a5a5 ; Fill all general regs with a fixed pattern
  15. ;; fixme set ccr
  16. ;; or.l #xx:16,Rd
  17. or.l #0xaaaa, er0 ; Immediate 16-bit operand
  18. ;; fixme test ccr ; H=0 N=1 Z=0 V=0 C=0
  19. test_h_gr32 0xa5a5afaf er0 ; or result: a5a5a5a5 | aaaa
  20. test_gr_a5a5 1 ; Make sure other general regs not disturbed
  21. test_gr_a5a5 2
  22. test_gr_a5a5 3
  23. test_gr_a5a5 4
  24. test_gr_a5a5 5
  25. test_gr_a5a5 6
  26. test_gr_a5a5 7
  27. .endif
  28. or_l_imm32:
  29. set_grs_a5a5 ; Fill all general regs with a fixed pattern
  30. ;; fixme set ccr
  31. ;; or.l #xx:32,Rd
  32. or.l #0xaaaaaaaa, er0 ; Immediate 32-bit operand
  33. ;; fixme test ccr ; H=0 N=1 Z=0 V=0 C=0
  34. test_h_gr32 0xafafafaf er0 ; or result: a5a5a5a5 | aaaaaaaa
  35. test_gr_a5a5 1 ; Make sure other general regs not disturbed
  36. test_gr_a5a5 2
  37. test_gr_a5a5 3
  38. test_gr_a5a5 4
  39. test_gr_a5a5 5
  40. test_gr_a5a5 6
  41. test_gr_a5a5 7
  42. or_l_reg:
  43. set_grs_a5a5 ; Fill all general regs with a fixed pattern
  44. ;; fixme set ccr
  45. ;; or.l Rs,Rd
  46. mov.l #0xaaaaaaaa, er1
  47. or.l er1, er0 ; Register operand
  48. ;; fixme test ccr ; H=0 N=1 Z=0 V=0 C=0
  49. test_h_gr32 0xafafafaf er0 ; or result: a5a5a5a5 | aaaaaaaa
  50. test_h_gr32 0xaaaaaaaa er1 ; Make sure er1 is unchanged
  51. test_gr_a5a5 2 ; Make sure other general regs not disturbed
  52. test_gr_a5a5 3
  53. test_gr_a5a5 4
  54. test_gr_a5a5 5
  55. test_gr_a5a5 6
  56. test_gr_a5a5 7
  57. pass
  58. exit 0