t-ld-st.s 460 B

123456789101112131415161718192021222324252627282930313233343536
  1. # mach: all
  2. # output:
  3. # sim: --environment operating
  4. .include "t-macros.i"
  5. start
  6. ; Test ld and st
  7. ld r4, @foo
  8. check 1 r4 0xdead
  9. ldi r4, #0x2152
  10. st r4, @foo
  11. ld r4, @foo
  12. check 2 r4 0x2152
  13. ; Test ld2w and st2w
  14. ldi r4, #0xdead
  15. st r4, @foo
  16. ld2w r4, @foo
  17. check2w2 3 r4 0xdead 0xf000
  18. ldi r4, #0x2112
  19. ldi r5, #0x1984
  20. st2w r4, @foo
  21. ld2w r4, @foo
  22. check2w2 4 r4 0x2112 0x1984
  23. .data
  24. .align 2
  25. foo: .short 0xdead
  26. bar: .short 0xf000
  27. .text
  28. exit0