github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/engine/wazevo/backend/isa/amd64/ext.go (about) 1 package amd64 2 3 // extMode represents the mode of extension in movzx/movsx. 4 type extMode byte 5 6 const ( 7 // extModeBL represents Byte -> Longword. 8 extModeBL extMode = iota 9 // extModeBQ represents Byte -> Quadword. 10 extModeBQ 11 // extModeWL represents Word -> Longword. 12 extModeWL 13 // extModeWQ represents Word -> Quadword. 14 extModeWQ 15 // extModeLQ represents Longword -> Quadword. 16 extModeLQ 17 ) 18 19 // String implements fmt.Stringer. 20 func (e extMode) String() string { 21 switch e { 22 case extModeBL: 23 return "bl" 24 case extModeBQ: 25 return "bq" 26 case extModeWL: 27 return "wl" 28 case extModeWQ: 29 return "wq" 30 case extModeLQ: 31 return "lq" 32 default: 33 panic("BUG: invalid ext mode") 34 } 35 }