@@ -13,6 +13,8 @@ def_reg_class! {
1313 freg,
1414 vreg,
1515 cr,
16+ ctr,
17+ lr,
1618 xer,
1719 }
1820}
@@ -56,7 +58,7 @@ impl PowerPCInlineAsmRegClass {
5658 altivec: VecI8 ( 16 ) , VecI16 ( 8 ) , VecI32 ( 4 ) , VecF32 ( 4 ) ;
5759 vsx: F32 , F64 , VecI64 ( 2 ) , VecF64 ( 2 ) ;
5860 } ,
59- Self :: cr | Self :: xer => & [ ] ,
61+ Self :: cr | Self :: ctr | Self :: lr | Self :: xer => & [ ] ,
6062 }
6163 }
6264}
@@ -195,6 +197,8 @@ def_regs! {
195197 cr5: cr = [ "cr5" ] ,
196198 cr6: cr = [ "cr6" ] ,
197199 cr7: cr = [ "cr7" ] ,
200+ ctr: ctr = [ "ctr" ] ,
201+ lr: lr = [ "lr" ] ,
198202 xer: xer = [ "xer" ] ,
199203 #error = [ "r1" , "1" , "sp" ] =>
200204 "the stack pointer cannot be used as an operand for inline asm" ,
@@ -206,10 +210,6 @@ def_regs! {
206210 "r30 is used internally by LLVM and cannot be used as an operand for inline asm" ,
207211 #error = [ "r31" , "31" , "fp" ] =>
208212 "the frame pointer cannot be used as an operand for inline asm" ,
209- #error = [ "lr" ] =>
210- "the link register cannot be used as an operand for inline asm" ,
211- #error = [ "ctr" ] =>
212- "the counter register cannot be used as an operand for inline asm" ,
213213 #error = [ "vrsave" ] =>
214214 "the vrsave register cannot be used as an operand for inline asm" ,
215215 }
@@ -247,6 +247,8 @@ impl PowerPCInlineAsmReg {
247247 ( v24, "24" ) , ( v25, "25" ) , ( v26, "26" ) , ( v27, "27" ) , ( v28, "28" ) , ( v29, "29" ) , ( v30, "30" ) , ( v31, "31" ) ;
248248 ( cr, "cr" ) ;
249249 ( cr0, "0" ) , ( cr1, "1" ) , ( cr2, "2" ) , ( cr3, "3" ) , ( cr4, "4" ) , ( cr5, "5" ) , ( cr6, "6" ) , ( cr7, "7" ) ;
250+ ( ctr, "ctr" ) ;
251+ ( lr, "lr" ) ;
250252 ( xer, "xer" ) ;
251253 }
252254 }
0 commit comments