mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
fix bug which failed to preserve source site during multi-word move
The compiler was failing to freeze the source site containing the value of the second word in a multi-word move, leading to mis-compiled code in some cases.
This commit is contained in:
parent
ac16a1a2ad
commit
cfd9dc6656
@ -3773,26 +3773,32 @@ class MoveEvent: public Event {
|
||||
and srcSelectSize >= dstSize)
|
||||
{
|
||||
if (dst->target) {
|
||||
if (dstSize > TargetBytesPerWord
|
||||
and src->source->registerSize(c) > TargetBytesPerWord)
|
||||
{
|
||||
apply(c, Move, srcSelectSize, src->source, src->source,
|
||||
dstSize, dst->target, dst->target);
|
||||
|
||||
if (live(c, dst) == 0) {
|
||||
removeSite(c, dst, dst->target);
|
||||
if (dstSize > TargetBytesPerWord) {
|
||||
removeSite(c, dst->nextWord, dst->nextWord->target);
|
||||
if (dstSize > TargetBytesPerWord) {
|
||||
if (src->source->registerSize(c) > TargetBytesPerWord) {
|
||||
apply(c, Move, srcSelectSize, src->source, src->source,
|
||||
dstSize, dst->target, dst->target);
|
||||
|
||||
if (live(c, dst) == 0) {
|
||||
removeSite(c, dst, dst->target);
|
||||
if (dstSize > TargetBytesPerWord) {
|
||||
removeSite(c, dst->nextWord, dst->nextWord->target);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
maybeMove(c, Move, TargetBytesPerWord, TargetBytesPerWord, src,
|
||||
TargetBytesPerWord, dst, dstLowMask);
|
||||
if (dstSize > TargetBytesPerWord) {
|
||||
} else {
|
||||
src->nextWord->source->freeze(c, src->nextWord);
|
||||
|
||||
maybeMove(c, Move, TargetBytesPerWord, TargetBytesPerWord, src,
|
||||
TargetBytesPerWord, dst, dstLowMask);
|
||||
|
||||
src->nextWord->source->thaw(c, src->nextWord);
|
||||
|
||||
maybeMove
|
||||
(c, Move, TargetBytesPerWord, TargetBytesPerWord, src->nextWord,
|
||||
TargetBytesPerWord, dst->nextWord, dstHighMask);
|
||||
}
|
||||
} else {
|
||||
maybeMove(c, Move, TargetBytesPerWord, TargetBytesPerWord, src,
|
||||
TargetBytesPerWord, dst, dstLowMask);
|
||||
}
|
||||
} else {
|
||||
Site* low = pickSiteOrMove(c, src, dst, 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user