JumpOp returns the JumpOp. Returns InvalidJumpOp if it doesn't encode a jump.
()
| 178 | // JumpOp returns the JumpOp. |
| 179 | // Returns InvalidJumpOp if it doesn't encode a jump. |
| 180 | func (op OpCode) JumpOp() JumpOp { |
| 181 | if !op.Class().IsJump() { |
| 182 | return InvalidJumpOp |
| 183 | } |
| 184 | |
| 185 | jumpOp := JumpOp(op & jumpMask) |
| 186 | |
| 187 | // Some JumpOps are only supported by JumpClass, not Jump32Class. |
| 188 | if op.Class() == Jump32Class && (jumpOp == Exit || jumpOp == Call) { |
| 189 | return InvalidJumpOp |
| 190 | } |
| 191 | |
| 192 | return jumpOp |
| 193 | } |
| 194 | |
| 195 | // SetMode sets the mode on load and store operations. |
| 196 | // |