llvm-context: remove the linear memory pointer indirection (#211)

This commit is contained in:
xermicus
2025-02-13 13:21:43 +01:00
committed by GitHub
parent f3a86588f3
commit cb268850a9
8 changed files with 74 additions and 68 deletions
+40
View File
@@ -0,0 +1,40 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
/* runner.json
{
"differential": true,
"actions": [
{
"Instantiate": {
"code": {
"Solidity": {
"contract": "MLoad"
}
}
}
},
{
"Call": {
"dest": {
"Instantiated": 0
},
"data": "e2179b8e"
}
}
]
}
*/
contract MLoad {
constructor() payable {
assert(g() == 0);
}
function g() public payable returns (uint m) {
assembly {
m := mload(0)
}
}
}