Skip to content

Commit 86cf530

Browse files
kychendevigcbot
authored andcommitted
Fix vISA parser for LSC 2D block operations
Update vISA parser to allow mixed register and immediate AddrX and AddrY operands for 2D block load/store vISA instructions.
1 parent 453b7cf commit 86cf530

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

visa/CISA.y

+40
Original file line numberDiff line numberDiff line change
@@ -2095,6 +2095,46 @@ LscUntypedBlock2dAddrOperand:
20952095
$$ = {nullptr,0,{$3,$5,$7,$9,$11,$13},{0, 0},{LSC_ADDR_TYPE_FLAT,1,0,LSC_ADDR_SIZE_64b}};
20962096
}
20972097
|
2098+
// 1 2
2099+
LSC_AM_FLAT LBRACK
2100+
// 3 (surfaceAddr)
2101+
LscVectorOpReg
2102+
// 4 5 (surfaceWidth)
2103+
COMMA LscVectorOpRegOrImm32
2104+
// 6 7 (surfaceHeight)
2105+
COMMA LscVectorOpRegOrImm32
2106+
// 8 9 (surfacePitch)
2107+
COMMA LscVectorOpRegOrImm32
2108+
// 10 11 (baseX)
2109+
COMMA LscVectorOpImm32
2110+
// 12 13 (baseY) 14
2111+
COMMA LscVectorOpReg LscAddrImmOffsetOpt
2112+
// 15
2113+
RBRACK
2114+
{
2115+
$$ = {nullptr,0,{$3,$5,$7,$9,$11,$13},{0, (int)$14},{LSC_ADDR_TYPE_FLAT,1,0,LSC_ADDR_SIZE_64b}};
2116+
}
2117+
|
2118+
// 1 2
2119+
LSC_AM_FLAT LBRACK
2120+
// 3 (surfaceAddr)
2121+
LscVectorOpReg
2122+
// 4 5 (surfaceWidth)
2123+
COMMA LscVectorOpRegOrImm32
2124+
// 6 7 (surfaceHeight)
2125+
COMMA LscVectorOpRegOrImm32
2126+
// 8 9 (surfacePitch)
2127+
COMMA LscVectorOpRegOrImm32
2128+
// 10 11 (baseX) 12
2129+
COMMA LscVectorOpReg LscAddrImmOffsetOpt
2130+
// 13 14 (baseY)
2131+
COMMA LscVectorOpImm32
2132+
// 15
2133+
RBRACK
2134+
{
2135+
$$ = {nullptr,0,{$3,$5,$7,$9,$11,$14},{(int)$12, 0},{LSC_ADDR_TYPE_FLAT,1,0,LSC_ADDR_SIZE_64b}};
2136+
}
2137+
|
20982138
// 1 2 3 4 5 6
20992139
LSC_AM_FLAT LBRACK LscVectorOpReg PLUS LPAREN IntExpUnr
21002140
// 7 8 9 10

0 commit comments

Comments
 (0)