and.cgs 744 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # arm testcase for and
  2. # mach: all
  3. # ??? Unfinished, more tests needed.
  4. .include "testutils.inc"
  5. start
  6. # and$cond${set-cc?} $rd,$rn,$imm12
  7. .global and_imm
  8. and_imm:
  9. mvi_h_gr r4,1
  10. mvi_h_cnvz 0,0,0,0
  11. and r5,r4,#1
  12. test_h_cnvz 0,0,0,0
  13. test_h_gr r5,1
  14. # and$cond${set-cc?} $rd,$rn,$rm,${operand2-shifttype} ${operand2-shiftimm}
  15. .global and_reg_imm_shift
  16. and_reg_imm_shift:
  17. mvi_h_gr r4,1
  18. mvi_h_gr r5,1
  19. mvi_h_cnvz 0,0,0,0
  20. and r6,r4,r5,lsl #1
  21. test_h_cnvz 0,0,0,0
  22. test_h_gr r6,0
  23. # and$cond${set-cc?} $rd,$rn,$rm,${operand2-shifttype} ${operand2-shiftreg}
  24. .global and_reg_reg_shift
  25. and_reg_reg_shift:
  26. mvi_h_gr r4,1
  27. mvi_h_gr r5,1
  28. mvi_h_gr r6,1
  29. mvi_h_cnvz 0,0,0,0
  30. and r7,r4,r5,lsl r6
  31. test_h_cnvz 0,0,0,0
  32. test_h_gr r7,0
  33. pass