mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-13 15:21:04 +00:00
llvm-context: remove the linear memory pointer indirection (#211)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user