Skip to content

Commit 968ae5c

Browse files
committed
feat: use ternary feature in TRM module
1 parent 599fdab commit 968ae5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testdata/asm/bench/trm.zkasm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const MAX_PRC_CONTIGUOUS_ADDRESS = 0x11
2-
;; const P256_VERIFY_ADDRESS = 0x100
2+
const P256_VERIFY_ADDRESS = 0x100
33

44
;; The address trimming module does two things: (i) reduce 256bit
55
;; addresses into u160 addresses (i.e. modulo 2^160); (b) identify
@@ -38,7 +38,7 @@ fn trm(RAW_ADDRESS u256) -> (ADDRESS_HI u32, IS_PRECOMPILE u1) {
3838
IS_PRECOMPILE=1
3939
return
4040
check_p256_verify:
41-
IS_PRECOMPILE = low == 0x100 ? 1 : 0
41+
IS_PRECOMPILE = low == P256_VERIFY_ADDRESS ? 1 : 0
4242
return
4343
exit_0:
4444
;; no, not precompile

0 commit comments

Comments
 (0)