[PATCH] D24667: [mips][ias] Handle more complicated expressions for memory operands

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 09:18:10 PDT 2016


sdardis added inline comments.


================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:4447-4453
+      case AsmToken::EqualEqual:     Opcode = MCBinaryExpr::EQ;   break;
+      case AsmToken::ExclaimEqual:   Opcode = MCBinaryExpr::NE;   break;
+      case AsmToken::Less:           Opcode = MCBinaryExpr::LT;   break;
+      case AsmToken::LessEqual:      Opcode = MCBinaryExpr::LTE;  break;
+      case AsmToken::LessLess:       Opcode = MCBinaryExpr::Shl;  break;
+      case AsmToken::Greater:        Opcode = MCBinaryExpr::GT;   break;
+      case AsmToken::GreaterEqual:   Opcode = MCBinaryExpr::GTE;  break;
----------------
vkalintiris wrote:
> We should test the comparison/equality operators in MC/Mips/memory-offsets.s as well. Can you check that we follow the GNU assembler behaviour for these?
I remember why I didn't test them in memory-offsets.s now. IAS will resolve the result of the comparison to '1' or '0'. GAS behaves oddly and gives 0 or -1. Given the differences, I think I should drop them altogether as I'm struggling to comprehend why someone would use a relational operator in a memory offset.


https://reviews.llvm.org/D24667





More information about the llvm-commits mailing list