[PATCH] D24607: [mips] seq macro support

Vasileios Kalintiris via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 07:49:11 PDT 2016


vkalintiris requested changes to this revision.
vkalintiris added a comment.
This revision now requires changes to proceed.

I didn't consider all the cases but it seems that the macro expansion is probably fine in terms of correctness. However, the expansion is different from that of GAS' and this will generate different object files unnecessarily. As far as I can tell, GAS handles these macro in 3 different ways depending on the value of the immediate:

1. imm == 0 -> generate just an sltiu,
2. op[1] == 0 -> generate warning and set op[0] = 0
3.
  - imm in [0, 0x10000) -> xori
  - imm in (-0x8000, 0) -> imm = -imm AND {,d}addiu
  - for every other imm -> loadImmediate && xor.
  - finally emit sltiu.


https://reviews.llvm.org/D24607





More information about the llvm-commits mailing list