mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix bugs with memory operations
This commit is contained in:
parent
f7e39e6a4d
commit
74db07537d
|
@ -84,14 +84,14 @@ public final class WasmRuntime {
|
||||||
address.putInt(0);
|
address.putInt(0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
address.add(3).putByte((byte) 0);
|
address.add(1).putByte((byte) 0);
|
||||||
|
address.add(2).putShort((short) 0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
address.add(2).putShort((short) 0);
|
address.add(2).putShort((short) 0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
address.add(1).putByte((byte) 0);
|
address.add(3).putByte((byte) 0);
|
||||||
address.add(2).putShort((short) 0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,14 +204,14 @@ public final class WasmRuntime {
|
||||||
alignedTargetStart.putInt(alignedSourceStart.getInt());
|
alignedTargetStart.putInt(alignedSourceStart.getInt());
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
alignedTargetStart.add(3).putByte(alignedSourceStart.add(3).getByte());
|
alignedTargetStart.add(2).putShort(alignedSourceStart.add(2).getShort());
|
||||||
|
alignedTargetStart.add(1).putByte(alignedSourceStart.add(1).getByte());
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
alignedTargetStart.add(2).putShort(alignedSourceStart.add(2).getShort());
|
alignedTargetStart.add(2).putShort(alignedSourceStart.add(2).getShort());
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
alignedTargetStart.add(2).putShort(alignedSourceStart.add(2).getShort());
|
alignedTargetStart.add(3).putByte(alignedSourceStart.add(3).getByte());
|
||||||
alignedTargetStart.add(1).putByte(alignedSourceStart.add(1).getByte());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user