# HG changeset patch # User Doug Simon # Date 1382976239 -3600 # Node ID 7f55cdeec6af6998adccd9933b72f79c2cd2f38f # Parent a9f750305a38bf3bbd36716a193370699825f3d8 improved documentation of HotSpotBackend.updateStub() diff -r a9f750305a38 -r 7f55cdeec6af graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotBackend.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotBackend.java Mon Oct 28 16:04:58 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotBackend.java Mon Oct 28 17:03:59 2013 +0100 @@ -127,6 +127,12 @@ /** * Updates a given stub with respect to the registers it destroys. + *

+ * Any entry in {@code calleeSaveInfo} that {@linkplain SaveRegistersOp#supportsRemove() + * supports} pruning will have {@code destroyedRegisters} + * {@linkplain SaveRegistersOp#remove(Set) removed} as these registers are declared as + * temporaries in the stub's {@linkplain ForeignCallLinkage linkage} (and thus will be saved by + * the stub's caller). * * @param stub the stub to update * @param destroyedRegisters the registers destroyed by the stub @@ -141,10 +147,6 @@ for (Map.Entry e : calleeSaveInfo.entrySet()) { SaveRegistersOp save = e.getValue(); if (save.supportsRemove()) { - // Since the registers destroyed by the stub are declared as temporaries in the - // linkage (see ForeignCallLinkage.getTemporaries()) for the stub, the caller - // will already save these registers and so there's no need for the stub to - // save them again. save.remove(destroyedRegisters); } DebugInfo info = e.getKey() == null ? null : e.getKey().debugInfo();