File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6843,7 +6843,12 @@ void GraphColor::stackCallProlog()
6843
6843
{
6844
6844
// mov (8) r126.0<1>:ud r0.0<8;8,1>:ud
6845
6845
// This sets up the header for oword block r/w used for caller/callee-save
6846
- // ToDo: check if this move is actually necessary
6846
+
6847
+ // Kernel should've already setup r0 in r126.
6848
+ // Useful data in r126 is expected to be preserved by all functions.
6849
+ if (kernel.fg .getIsStackCallFunc ())
6850
+ return ;
6851
+
6847
6852
auto dstRgn = builder.Create_Dst_Opnd_From_Dcl (builder.kernel .fg .scratchRegDcl , 1 );
6848
6853
auto srcRgn = builder.Create_Src_Opnd_From_Dcl (builder.getBuiltinR0 (), builder.getRegionStride1 ());
6849
6854
@@ -7803,7 +7808,6 @@ void GlobalRA::addCalleeSavePseudoCode()
7803
7808
builder.instList .clear ();
7804
7809
}
7805
7810
7806
-
7807
7811
//
7808
7812
// Insert pseudo operation to store fp at entry and restore before return.
7809
7813
// Dst of store will be a temp that will run through RA and get an allocation.
You can’t perform that action at this time.
0 commit comments