1
1
/*
2
- * Copyright (c) 2023, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2023, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -196,7 +196,6 @@ public StructuredGraph buildGraph(DebugContext debug, AnalysisMethod method, Hos
196
196
*/
197
197
assert !savedRegisters .asList ().contains (registers .methodHandle ());
198
198
assert !savedRegisters .asList ().contains (registers .isolate ());
199
- var save = kit .saveRegisters (savedRegisters );
200
199
ValueNode enterResult = kit .append (CEntryPointEnterNode .attachThread (isolate , false , true ));
201
200
202
201
kit .startIf (IntegerEqualsNode .create (enterResult , ConstantNode .forInt (CEntryPointErrors .NO_ERROR , kit .getGraph ()), NodeView .DEFAULT ),
@@ -235,8 +234,6 @@ public StructuredGraph buildGraph(DebugContext debug, AnalysisMethod method, Hos
235
234
long offset = 0 ;
236
235
for (AssignedLocation loc : AbiUtils .create ().toMemoryAssignment (jep .returnAssignment (), true )) {
237
236
assert loc .assignsToRegister ();
238
- // an output location must not be a callee-save register
239
- assert !save .containsKey (loc .register ());
240
237
241
238
AddressNode address = new OffsetAddressNode (returnBuffer , ConstantNode .forLong (offset , kit .getGraph ()));
242
239
ReadNode val = kit .append (new ReadNode (address , LocationIdentity .any (), StampFactory .forKind (loc .registerKind ()), BarrierType .NONE , MemoryOrderMode .PLAIN ));
@@ -251,7 +248,6 @@ public StructuredGraph buildGraph(DebugContext debug, AnalysisMethod method, Hos
251
248
assert offset == jep .returnBufferSize ();
252
249
}
253
250
kit .append (new CEntryPointLeaveNode (CEntryPointLeaveNode .LeaveAction .Leave ));
254
- kit .restoreRegisters (save );
255
251
kit .createReturn (returnValue , jep .cMethodType ());
256
252
257
253
return kit .finalizeGraph ();
0 commit comments