[PATCH] Sparc: Add the alternate address space load/store instructions.

Eric Christopher echristo at gmail.com
Wed May 13 15:11:28 PDT 2015


A few comments inline, but at least for assembly this is probably ok. You'll need to add some comments/code generation options to the patterns, but for the first part it's ok. Don't worry about getting a fresh LGTM with the comments, I'll post-commit review those.

-eric


================
Comment at: lib/Target/Sparc/SparcInstr64Bit.td:489
@@ -488,3 +488,3 @@
 // ATOMICS.
-let Predicates = [Is64Bit], Constraints = "$swap = $rd" in {
-  def CASXrr: F3_1_asi<3, 0b111110, 0b10000000,
+let Predicates = [Is64Bit], Constraints = "$swap = $rd", asi = 0b10000000 in {
+  def CASXrr: F3_1_asi<3, 0b111110,
----------------
What I meant in my request is "what's this magic number? Can you add an appropriate comment as to what it is?" Feel free to do that after since you're just moving an existing magic number around.

================
Comment at: lib/Target/Sparc/SparcInstrInfo.td:292
@@ +291,3 @@
+                !strconcat(OpcStr, "a [$addr] $asi, $dst"),
+                [/*FIXME: pattern?*/]>;
+}
----------------
You probably want a pattern if you expect to match anything during code generation. If you don't plan on adding that now then having a couple of block comments would be good.

http://reviews.llvm.org/D8904

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list