Parse insertlane and extractlane instruction formats.
These instruction formats take immediate lane index operands. We store these as u8 fields and require them to be in decimal format in the source. No hexadecimal lane indexes are supported.
This commit is contained in:
@@ -15,6 +15,14 @@ ebb0:
|
||||
|
||||
; Polymorphic istruction controlled by second operand.
|
||||
function select() {
|
||||
ebb0(vx0: i32, vx1:i32, vx2: b1):
|
||||
ebb0(vx0: i32, vx1: i32, vx2: b1):
|
||||
v0 = select vx2, vx0, vx1
|
||||
}
|
||||
|
||||
; Lane indexes.
|
||||
function lanes() {
|
||||
ebb0:
|
||||
v0 = iconst.i32x4 2
|
||||
v1 = extractlane v0, 3
|
||||
v2 = insertlane v0, 1, v1
|
||||
}
|
||||
|
||||
@@ -14,3 +14,10 @@ function select() {
|
||||
ebb0(vx0: i32, vx1: i32, vx2: b1):
|
||||
v0 = select vx2, vx0, vx1
|
||||
}
|
||||
|
||||
function lanes() {
|
||||
ebb0:
|
||||
v0 = iconst.i32x4 2
|
||||
v1 = extractlane v0, 3
|
||||
v2 = insertlane v0, 1, v1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user