Skip to content

Commit 9897f98

Browse files
committed
adjust comments
1 parent 09e0a36 commit 9897f98

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

extensions/transpiler/src/instructions.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ pub use openvm_rv32im_transpiler::{
2727
#[repr(usize)]
2828
// Note: these need to be exactly the same and in the exact same order as OpenVM's BaseAluOpcode
2929
// in order to be able to re-use the original Alu core chip.
30-
// The alternative to that is to not have this new enum here and use OpenVM's BaseAluOpcode.
30+
// We do re-use the `BaseAluOpcode` type for 32-bit operations, but need a new opcode/enum for
31+
// 64-bit ops.
3132
pub enum BaseAlu64Opcode {
3233
ADD,
3334
SUB,
@@ -55,7 +56,8 @@ pub enum BaseAlu64Opcode {
5556
#[repr(usize)]
5657
// Note: these need to be exactly the same and in the exact same order as OpenVM's ShiftOpcode
5758
// in order to be able to re-use the original Shift core chip.
58-
// The alternative to that is to not have this new enum here and use OpenVM's ShiftOpcode.
59+
// We do re-use the `BaseAluOpcode` type for 32-bit operations, but need a new opcode/enum for
60+
// 64-bit ops.
5961
pub enum Shift64Opcode {
6062
SLL,
6163
SRL,
@@ -81,7 +83,8 @@ pub enum Shift64Opcode {
8183
#[repr(usize)]
8284
// Note: these need to be exactly the same and in the exact same order as OpenVM's LessThanOpcode
8385
// in order to be able to re-use the original LessThan core chip.
84-
// The alternative to that is to not have this new enum here and use OpenVM's LessThanOpcode.
86+
// We do re-use the `BaseAluOpcode` type for 32-bit operations, but need a new opcode/enum for
87+
// 64-bit ops.
8588
pub enum LessThan64Opcode {
8689
SLT,
8790
SLTU,
@@ -190,7 +193,8 @@ pub enum JumpOpcode {
190193
#[allow(non_camel_case_types)]
191194
// Note: these need to be exactly the same and in the exact same order as OpenVM's MulOpcode
192195
// in order to be able to re-use the original Mul core chip.
193-
// The alternative to that is to not have this new enum here and use OpenVM's MulOpcode.
196+
// We do re-use the `BaseAluOpcode` type for 32-bit operations, but need a new opcode/enum for
197+
// 64-bit ops.
194198
pub enum Mul64Opcode {
195199
MUL,
196200
}
@@ -215,7 +219,8 @@ pub enum Mul64Opcode {
215219
#[allow(non_camel_case_types)]
216220
// Note: these need to be exactly the same and in the exact same order as OpenVM's DivRemOpcode
217221
// in order to be able to re-use the original DivRem core chip.
218-
// The alternative to that is to not have this new enum here and use OpenVM's DivRemOpcode.
222+
// We do re-use the `BaseAluOpcode` type for 32-bit operations, but need a new opcode/enum for
223+
// 64-bit ops.
219224
pub enum DivRem64Opcode {
220225
DIV,
221226
DIVU,

0 commit comments

Comments
 (0)