addicc.cgs 755 B

123456789101112131415161718192021222324252627282930
  1. # frv testcase for addicc $GRi,$s10,$GRk,$ICCi_1
  2. # mach: all
  3. .include "testutils.inc"
  4. start
  5. .global addicc
  6. addicc:
  7. ; Test add $u4Ri
  8. set_gr_immed 4,gr8
  9. set_icc 0x0f,0 ; Set mask opposite of expected
  10. addicc gr8,0,gr8,icc0
  11. test_icc 0 0 0 0 icc0
  12. test_gr_immed 4,gr8
  13. set_icc 0x0f,0 ; Set mask opposite of expected
  14. addicc gr8,1,gr8,icc0
  15. test_icc 0 0 0 0 icc0
  16. test_gr_immed 5,gr8
  17. set_icc 0x0f,0 ; Set mask opposite of expected
  18. addicc gr8,15,gr8,icc0
  19. test_icc 0 0 0 0 icc0
  20. test_gr_immed 20,gr8
  21. set_gr_limmed 0x7fff,0xffff,gr8 ; test neg and overflow bits
  22. set_icc 0x05,0 ; Set mask opposite of expected
  23. addicc gr8,1,gr8,icc0
  24. test_icc 1 0 1 0 icc0
  25. test_gr_limmed 0x8000,0x0000,gr8
  26. pass