mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
LLL: ensure assembly tests have the correct arguments
This commit is contained in:
parent
e82917d4e6
commit
90e4d24407
@ -373,59 +373,59 @@ BOOST_AUTO_TEST_CASE(valid_opcodes_asm)
|
||||
{
|
||||
vector<string> opcodes_bytecode {
|
||||
"0000",
|
||||
"0100",
|
||||
"0200",
|
||||
"0300",
|
||||
"0400",
|
||||
"0500",
|
||||
"0600",
|
||||
"0700",
|
||||
"0800",
|
||||
"0900",
|
||||
"0a00",
|
||||
"0b00",
|
||||
"1000",
|
||||
"1100",
|
||||
"1200",
|
||||
"1300",
|
||||
"1400",
|
||||
"1500",
|
||||
"1600",
|
||||
"1700",
|
||||
"1800",
|
||||
"1900",
|
||||
"1a00",
|
||||
"2000",
|
||||
"600060000100",
|
||||
"600060000200",
|
||||
"600060000300",
|
||||
"600060000400",
|
||||
"600060000500",
|
||||
"600060000600",
|
||||
"600060000700",
|
||||
"6000600060000800",
|
||||
"6000600060000900",
|
||||
"600060000a00",
|
||||
"600060000b00",
|
||||
"600060001000",
|
||||
"600060001100",
|
||||
"600060001200",
|
||||
"600060001300",
|
||||
"600060001400",
|
||||
"60001500",
|
||||
"600060001600",
|
||||
"600060001700",
|
||||
"600060001800",
|
||||
"60001900",
|
||||
"600060001a00",
|
||||
"600060002000",
|
||||
"3000",
|
||||
"3100",
|
||||
"60003100",
|
||||
"3200",
|
||||
"3300",
|
||||
"3400",
|
||||
"3500",
|
||||
"60003500",
|
||||
"3600",
|
||||
"3700",
|
||||
"6000600060003700",
|
||||
"3800",
|
||||
"3900",
|
||||
"6000600060003900",
|
||||
"3a00",
|
||||
"3b00",
|
||||
"3c00",
|
||||
"60003b00",
|
||||
"60006000600060003c00",
|
||||
"3d00",
|
||||
"3e00",
|
||||
"3f00",
|
||||
"6000600060003e00",
|
||||
"60003f00",
|
||||
"4000",
|
||||
"4100",
|
||||
"4200",
|
||||
"4300",
|
||||
"4400",
|
||||
"4500",
|
||||
"5000",
|
||||
"5100",
|
||||
"5200",
|
||||
"5300",
|
||||
"5400",
|
||||
"5500",
|
||||
"5600",
|
||||
"5700",
|
||||
"60005000",
|
||||
"60005100",
|
||||
"600060005200",
|
||||
"600060005300",
|
||||
"60005400",
|
||||
"600060005500",
|
||||
"60005600",
|
||||
"600060005700",
|
||||
"5800",
|
||||
"5900",
|
||||
"5a00",
|
||||
@ -462,109 +462,109 @@ BOOST_AUTO_TEST_CASE(valid_opcodes_asm)
|
||||
"7dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00",
|
||||
"7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00",
|
||||
"7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00",
|
||||
"8000",
|
||||
"8100",
|
||||
"8200",
|
||||
"8300",
|
||||
"8400",
|
||||
"8500",
|
||||
"8600",
|
||||
"8700",
|
||||
"8800",
|
||||
"8900",
|
||||
"8a00",
|
||||
"8b00",
|
||||
"8c00",
|
||||
"8d00",
|
||||
"8e00",
|
||||
"8f00",
|
||||
"9000",
|
||||
"9100",
|
||||
"9200",
|
||||
"9300",
|
||||
"9400",
|
||||
"9500",
|
||||
"9600",
|
||||
"9700",
|
||||
"9800",
|
||||
"9900",
|
||||
"9a00",
|
||||
"9b00",
|
||||
"9c00",
|
||||
"9d00",
|
||||
"9e00",
|
||||
"9f00",
|
||||
"a000",
|
||||
"a100",
|
||||
"a200",
|
||||
"a300",
|
||||
"a400",
|
||||
"f000",
|
||||
"f100",
|
||||
"f200",
|
||||
"f300",
|
||||
"f400",
|
||||
"fa00",
|
||||
"fd00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008000",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008100",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008200",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008300",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008400",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008500",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008600",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008700",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008800",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008900",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008a00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008b00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008c00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008d00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008e00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060008f00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009000",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009100",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009200",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009300",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009400",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009500",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009600",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009700",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009800",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009900",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009a00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009b00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009c00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009d00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009e00",
|
||||
"60006000600060006000600060006000600060006000600060006000600060009f00",
|
||||
"60006000a000",
|
||||
"600060006000a100",
|
||||
"6000600060006000a200",
|
||||
"60006000600060006000a300",
|
||||
"600060006000600060006000a400",
|
||||
"600060006000f000",
|
||||
"600060006000600060006000f100",
|
||||
"600060006000600060006000f200",
|
||||
"60006000f300",
|
||||
"60006000600060006000f400",
|
||||
"60006000600060006000fa00",
|
||||
"60006000fd00",
|
||||
"fe00",
|
||||
"ff00"
|
||||
"6000ff00"
|
||||
};
|
||||
|
||||
vector<string> opcodes_lll {
|
||||
"(asm STOP)",
|
||||
"(asm ADD)",
|
||||
"(asm MUL)",
|
||||
"(asm SUB)",
|
||||
"(asm DIV)",
|
||||
"(asm SDIV )",
|
||||
"(asm MOD)",
|
||||
"(asm SMOD)",
|
||||
"(asm ADDMOD)",
|
||||
"(asm MULMOD)",
|
||||
"(asm EXP)",
|
||||
"(asm SIGNEXTEND)",
|
||||
"(asm LT)",
|
||||
"(asm GT)",
|
||||
"(asm SLT)",
|
||||
"(asm SGT)",
|
||||
"(asm EQ)",
|
||||
"(asm ISZERO)",
|
||||
"(asm AND)",
|
||||
"(asm OR)",
|
||||
"(asm XOR)",
|
||||
"(asm NOT)",
|
||||
"(asm BYTE)",
|
||||
"(asm KECCAK256)",
|
||||
"(asm 0 0 ADD)",
|
||||
"(asm 0 0 MUL)",
|
||||
"(asm 0 0 SUB)",
|
||||
"(asm 0 0 DIV)",
|
||||
"(asm 0 0 SDIV)",
|
||||
"(asm 0 0 MOD)",
|
||||
"(asm 0 0 SMOD)",
|
||||
"(asm 0 0 0 ADDMOD)",
|
||||
"(asm 0 0 0 MULMOD)",
|
||||
"(asm 0 0 EXP)",
|
||||
"(asm 0 0 SIGNEXTEND)",
|
||||
"(asm 0 0 LT)",
|
||||
"(asm 0 0 GT)",
|
||||
"(asm 0 0 SLT)",
|
||||
"(asm 0 0 SGT)",
|
||||
"(asm 0 0 EQ)",
|
||||
"(asm 0 ISZERO)",
|
||||
"(asm 0 0 AND)",
|
||||
"(asm 0 0 OR)",
|
||||
"(asm 0 0 XOR)",
|
||||
"(asm 0 NOT)",
|
||||
"(asm 0 0 BYTE)",
|
||||
"(asm 0 0 KECCAK256)",
|
||||
"(asm ADDRESS)",
|
||||
"(asm BALANCE)",
|
||||
"(asm 0 BALANCE)",
|
||||
"(asm ORIGIN)",
|
||||
"(asm CALLER)",
|
||||
"(asm CALLVALUE)",
|
||||
"(asm CALLDATALOAD)",
|
||||
"(asm 0 CALLDATALOAD)",
|
||||
"(asm CALLDATASIZE)",
|
||||
"(asm CALLDATACOPY)",
|
||||
"(asm 0 0 0 CALLDATACOPY)",
|
||||
"(asm CODESIZE)",
|
||||
"(asm CODECOPY)",
|
||||
"(asm 0 0 0 CODECOPY)",
|
||||
"(asm GASPRICE)",
|
||||
"(asm EXTCODESIZE)}",
|
||||
"(asm EXTCODECOPY)",
|
||||
"(asm 0 EXTCODESIZE)",
|
||||
"(asm 0 0 0 0 EXTCODECOPY)",
|
||||
"(asm RETURNDATASIZE)",
|
||||
"(asm RETURNDATACOPY)",
|
||||
"(asm EXTCODEHASH)",
|
||||
"(asm 0 0 0 RETURNDATACOPY)",
|
||||
"(asm 0 EXTCODEHASH)",
|
||||
"(asm BLOCKHASH)",
|
||||
"(asm COINBASE)",
|
||||
"(asm TIMESTAMP)",
|
||||
"(asm NUMBER)",
|
||||
"(asm DIFFICULTY)",
|
||||
"(asm GASLIMIT)",
|
||||
"(asm POP)",
|
||||
"(asm MLOAD)",
|
||||
"(asm MSTORE)",
|
||||
"(asm MSTORE8)",
|
||||
"(asm SLOAD)",
|
||||
"(asm SSTORE)",
|
||||
"(asm JUMP )",
|
||||
"(asm JUMPI )",
|
||||
"(asm 0 POP)",
|
||||
"(asm 0 MLOAD)",
|
||||
"(asm 0 0 MSTORE)",
|
||||
"(asm 0 0 MSTORE8)",
|
||||
"(asm 0 SLOAD)",
|
||||
"(asm 0 0 SSTORE)",
|
||||
"(asm 0 JUMP)",
|
||||
"(asm 0 0 JUMPI)",
|
||||
"(asm PC)",
|
||||
"(asm MSIZE)",
|
||||
"(asm GAS)",
|
||||
@ -601,52 +601,52 @@ BOOST_AUTO_TEST_CASE(valid_opcodes_asm)
|
||||
"(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)",
|
||||
"(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)",
|
||||
"(asm 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)",
|
||||
"(asm DUP1)",
|
||||
"(asm DUP2)",
|
||||
"(asm DUP3)",
|
||||
"(asm DUP4)",
|
||||
"(asm DUP5)",
|
||||
"(asm DUP6)",
|
||||
"(asm DUP7)",
|
||||
"(asm DUP8)",
|
||||
"(asm DUP9)",
|
||||
"(asm DUP10)",
|
||||
"(asm DUP11)",
|
||||
"(asm DUP12)",
|
||||
"(asm DUP13)",
|
||||
"(asm DUP14)",
|
||||
"(asm DUP15)",
|
||||
"(asm DUP16)",
|
||||
"(asm SWAP1)",
|
||||
"(asm SWAP2)",
|
||||
"(asm SWAP3)",
|
||||
"(asm SWAP4)",
|
||||
"(asm SWAP5)",
|
||||
"(asm SWAP6)",
|
||||
"(asm SWAP7)",
|
||||
"(asm SWAP8)",
|
||||
"(asm SWAP9)",
|
||||
"(asm SWAP10)",
|
||||
"(asm SWAP11)",
|
||||
"(asm SWAP12)",
|
||||
"(asm SWAP13)",
|
||||
"(asm SWAP14)",
|
||||
"(asm SWAP15)",
|
||||
"(asm SWAP16)",
|
||||
"(asm LOG0)",
|
||||
"(asm LOG1)",
|
||||
"(asm LOG2)",
|
||||
"(asm LOG3)",
|
||||
"(asm LOG4)",
|
||||
"(asm CREATE)",
|
||||
"(asm CALL)",
|
||||
"(asm CALLCODE)",
|
||||
"(asm RETURN)",
|
||||
"(asm DELEGATECALL)",
|
||||
"(asm STATICCALL)",
|
||||
"(asm REVERT)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DUP1)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DUP2)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DUP3)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DUP4)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DUP5)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DUP6)",
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0 0 0 0 SWAP11)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SWAP12)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SWAP13)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SWAP14)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SWAP15)",
|
||||
"(asm 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SWAP16)",
|
||||
"(asm 0 0 LOG0)",
|
||||
"(asm 0 0 0 LOG1)",
|
||||
"(asm 0 0 0 0 LOG2)",
|
||||
"(asm 0 0 0 0 0 LOG3)",
|
||||
"(asm 0 0 0 0 0 0 LOG4)",
|
||||
"(asm 0 0 0 CREATE)",
|
||||
"(asm 0 0 0 0 0 0 CALL)",
|
||||
"(asm 0 0 0 0 0 0 CALLCODE)",
|
||||
"(asm 0 0 RETURN)",
|
||||
"(asm 0 0 0 0 0 DELEGATECALL)",
|
||||
"(asm 0 0 0 0 0 STATICCALL)",
|
||||
"(asm 0 0 REVERT)",
|
||||
"(asm INVALID)",
|
||||
"(asm SELFDESTRUCT)"
|
||||
"(asm 0 SELFDESTRUCT)"
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < opcodes_bytecode.size(); i++)
|
||||
|
Loading…
Reference in New Issue
Block a user