2023-11-01 03:32:09 +00:00
|
|
|
# Nimbus
|
2024-03-20 07:35:38 +00:00
|
|
|
# Copyright (c) 2019-2024 Status Research & Development GmbH
|
2023-11-01 03:32:09 +00:00
|
|
|
# Licensed under either of
|
|
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
|
|
|
# http://opensource.org/licenses/MIT)
|
|
|
|
# at your option. This file may not be copied, modified, or distributed except
|
|
|
|
# according to those terms.
|
|
|
|
|
2019-05-30 16:42:55 +00:00
|
|
|
import macro_assembler, unittest2
|
2019-01-30 12:29:04 +00:00
|
|
|
|
2019-09-21 05:45:23 +00:00
|
|
|
proc opBitMain*() =
|
|
|
|
suite "Bitwise Opcodes":
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # And OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "AND_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x0A"
|
|
|
|
Push1 "0x0A"
|
|
|
|
And
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x000000000000000000000000000000000000000000000000000000000000000A"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # And OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "AND_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0xC0"
|
|
|
|
Push1 "0x0A"
|
|
|
|
And
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # And OP mal data
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "AND_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0xC0"
|
|
|
|
And
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0xC0"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Or OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "OR_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0xF0"
|
|
|
|
Push1 "0x0F"
|
|
|
|
Or
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x00000000000000000000000000000000000000000000000000000000000000FF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Or OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "OR_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0xC3"
|
|
|
|
Push1 "0x3C"
|
|
|
|
Or
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x00000000000000000000000000000000000000000000000000000000000000FF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Or OP mal data
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "OR_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0xC0"
|
|
|
|
Or
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0xC0"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Xor OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "XOR_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0xFF"
|
|
|
|
Push1 "0xFF"
|
|
|
|
Xor
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Xor OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "XOR_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x0F"
|
|
|
|
Push1 "0xF0"
|
|
|
|
Xor
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x00000000000000000000000000000000000000000000000000000000000000FF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Xor OP mal data
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "XOR_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0xC0"
|
|
|
|
Xor
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0xC0"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Byte OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "BYTE_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push6 "0xAABBCCDDEEFF"
|
|
|
|
Push1 "0x1E"
|
|
|
|
Byte
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x00000000000000000000000000000000000000000000000000000000000000EE"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Byte OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "BYTE_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push6 "0xAABBCCDDEEFF"
|
|
|
|
Push1 "0x20"
|
|
|
|
Byte
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Byte OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "BYTE_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push6 "0xAABBCCDDEE3A"
|
|
|
|
Push1 "0x1F"
|
|
|
|
Byte
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x000000000000000000000000000000000000000000000000000000000000003A"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Byte OP mal data
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "BYTE_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push6 "0xAABBCCDDEE3A"
|
|
|
|
Byte
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0xAABBCCDDEE3A"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push1 "0x00"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push1 "0x01"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000002"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push1 "0xff"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push2 "0x0100"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_5"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push2 "0x0101"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_6"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0x00"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_7"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0x01"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_8"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0xff"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_9"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push2 "0x0100"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_10"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push1 "0x01"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shl OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHL_11"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0x01"
|
|
|
|
Shl
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push1 "0x00"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push1 "0x01"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push1 "0x01"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x4000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push1 "0xff"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_5"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push2 "0x0100"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_6"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push2 "0x0101"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_7"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0x00"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_8"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0x01"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_9"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0xff"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_10"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push2 "0x0100"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Shr OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SHR_11"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push1 "0x01"
|
|
|
|
Shr
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push1 "0x00"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
Push1 "0x01"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push1 "0x01"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xC000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push1 "0xff"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_5"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push2 "0x0100"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_6"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x8000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push2 "0x0101"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_7"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0x00"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_8"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0x01"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_9"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0xff"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_10"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push2 "0x0100"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_11"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push1 "0x01"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_12"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x4000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
Push1 "0xfe"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_13"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0xf8"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x000000000000000000000000000000000000000000000000000000000000007F"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_14"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0xfe"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_15"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push1 "0xff"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sar OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SAR_16"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
|
|
|
|
Push2 "0x0100"
|
|
|
|
Sar
|
2023-03-22 11:18:37 +00:00
|
|
|
fork: Constantinople
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # IsZero OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "ISZERO_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x00"
|
|
|
|
IsZero
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # IsZero OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "ISZERO_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x2A"
|
|
|
|
IsZero
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # IsZero OP mal data
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "ISZERO_3"
|
2024-03-20 07:35:38 +00:00
|
|
|
code: IsZero
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Eq OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "EQ_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x2A"
|
|
|
|
Push1 "0x2A"
|
|
|
|
Eq
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Eq OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "EQ_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push3 "0x2A3B4C"
|
|
|
|
Push3 "0x2A3B4C"
|
|
|
|
Eq
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Eq OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "EQ_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push3 "0x2A3B5C"
|
|
|
|
Push3 "0x2A3B4C"
|
|
|
|
Eq
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Eq OP mal data
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "EQ_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push3 "0x2A3B4C"
|
|
|
|
Eq
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0x2A3B4C"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Gt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "GT_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x01"
|
|
|
|
Push1 "0x02"
|
|
|
|
Gt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Gt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "GT_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x01"
|
|
|
|
Push2 "0x0F00"
|
|
|
|
Gt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Gt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "GT_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push4 "0x01020304"
|
|
|
|
Push2 "0x0F00"
|
|
|
|
Gt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Gt OP mal data
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "GT_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push3 "0x2A3B4C"
|
|
|
|
Gt
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0x2A3B4C"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sgt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SGT_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x01"
|
|
|
|
Push1 "0x02"
|
|
|
|
Sgt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sgt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SGT_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x000000000000000000000000000000000000000000000000000000000000001E" # 30
|
|
|
|
Push32 "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" # -170
|
|
|
|
Sgt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sgt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SGT_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" # -170
|
|
|
|
Push32 "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF57" # -169
|
|
|
|
Sgt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Sgt OP mal
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SGT_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" # -170
|
|
|
|
Sgt
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Lt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "LT_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x01"
|
|
|
|
Push1 "0x02"
|
|
|
|
Lt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Lt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "LT_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x01"
|
|
|
|
Push2 "0x0F00"
|
|
|
|
Lt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Lt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "LT_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push4 "0x01020304"
|
|
|
|
Push2 "0x0F00"
|
|
|
|
Lt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Lt OP mal data
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "LT_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push3 "0x2A3B4C"
|
|
|
|
Lt
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0x2A3B4C"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Slt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SLT_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x01"
|
|
|
|
Push1 "0x02"
|
|
|
|
Slt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Slt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SLT_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0x000000000000000000000000000000000000000000000000000000000000001E" # 30
|
|
|
|
Push32 "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" # -170
|
|
|
|
Slt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000001"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Slt OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SLT_3"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" # -170
|
|
|
|
Push32 "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF57" # -169
|
|
|
|
Slt
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0x0000000000000000000000000000000000000000000000000000000000000000"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Slt OP mal
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "SLT_4"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push32 "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56" # -170
|
|
|
|
Slt
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF56"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Not OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "NOT_1"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x01"
|
|
|
|
Not
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE"
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Not OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "NOT_2"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push2 "0xA003"
|
|
|
|
Not
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5FFC"
|
|
|
|
|
|
|
|
assembler: # BNOT OP
|
|
|
|
title: "BNOT_4"
|
2024-03-20 07:35:38 +00:00
|
|
|
code: Not
|
2019-09-21 05:45:23 +00:00
|
|
|
success: false
|
|
|
|
|
2024-03-20 07:35:38 +00:00
|
|
|
assembler: # Not OP
|
2019-09-21 05:45:23 +00:00
|
|
|
title: "NOT_5"
|
|
|
|
code:
|
2024-03-20 07:35:38 +00:00
|
|
|
Push1 "0x00"
|
|
|
|
Not
|
2019-09-21 05:45:23 +00:00
|
|
|
stack: "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
2021-10-14 08:00:02 +00:00
|
|
|
|
|
|
|
when isMainModule:
|
|
|
|
opBitMain()
|