[llvm] r336054 - [X86] Remove the AsmName from the HAX, HDX, HCX, HBX, HSI, HDI, HBP, HSP, HIP artificial registers so they can't be parsed by the assembly parser.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 30 15:38:41 PDT 2018


Author: ctopper
Date: Sat Jun 30 15:38:41 2018
New Revision: 336054

URL: http://llvm.org/viewvc/llvm-project?rev=336054&view=rev
Log:
[X86] Remove the AsmName from the HAX,HDX,HCX,HBX,HSI,HDI,HBP,HSP,HIP artificial registers so they can't be parsed by the assembly parser.

There are no instructions that use them so they weren't causing any bad matches. But they weren't being diagnosed as "invalid register name" if they were used and would instead trigger some form of invalid operand.

Modified:
    llvm/trunk/lib/Target/X86/X86RegisterInfo.td

Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.td?rev=336054&r1=336053&r2=336054&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.td Sat Jun 30 15:38:41 2018
@@ -90,15 +90,15 @@ def SP : X86Reg<"sp", 4, [SPL]>;
 def IP : X86Reg<"ip", 0>;
 
 let isArtificial = 1 in {
-  def HAX : X86Reg<"hax", -1>;
-  def HDX : X86Reg<"hdx", -3>;
-  def HCX : X86Reg<"hcx", -2>;
-  def HBX : X86Reg<"hbx", -4>;
-  def HSI : X86Reg<"hsi", -7>;
-  def HDI : X86Reg<"hdi", -8>;
-  def HBP : X86Reg<"hbp", -6>;
-  def HSP : X86Reg<"hsp", -5>;
-  def HIP : X86Reg<"hip", -1>;
+  def HAX : X86Reg<"", -1>;
+  def HDX : X86Reg<"", -3>;
+  def HCX : X86Reg<"", -2>;
+  def HBX : X86Reg<"", -4>;
+  def HSI : X86Reg<"", -7>;
+  def HDI : X86Reg<"", -8>;
+  def HBP : X86Reg<"", -6>;
+  def HSP : X86Reg<"", -5>;
+  def HIP : X86Reg<"", -1>;
 }
 
 // X86-64 only, requires REX.




More information about the llvm-commits mailing list