MSA 011110 |
s10 |
rs |
wd |
MI10 1000 |
df |
6 |
10 |
5 |
5 |
4 |
2 |
LD.df |
Vector Load | |
LD.B wd,s10(rs) |
MSA |
Vector Load |
LD.H wd,s10(rs) |
MSA |
Vector Load |
LD.W wd,s10(rs) |
MSA |
Vector Load |
LD.D wd,s10(rs) |
MSA |
Vector Load |
Vector Load
Vector load element-by-element from base register plus offset memory address,
wd[i] = memory[rs + (s10 + i) * sizeof(wd[i])]
The WRLEN / 8 bytes at the ef fective memory location addressed by the basers and the 10-bit signed immediate offset s10 are fetched and placed in wd as elements of data format df.
The s10 offset in data format df units is added to the base rs to form the effective memory location address. rs and the effective memory location address have no alignment restrictions.
If the effective memory location address is element aligned, the vector load instruction is atomic at the element level with no guaranteed ordering among elemen ts, i.e. each element load is an ato mic operation issued in no particular order with respect to the element's vector position.
By convention, in the assembly language syntax all offsets are in bytes and have to be multiple of the size of the data format df. The assembler determines the s10 bitfield value dividing the byte offset by the size of the data format df.
Address-dependent exceptions are possible.
LD.B a = rs + s10 LoadByteVector(WR[wd]WRLEN-1..0, a, WRLEN/8) LD.H a = rs + s10 * 2 LoadHalfwordVector(WR[wd]WRLEN-1..0, a, WRLEN/16) LD.W a = rs + s10 * 4 LoadWordVector(WR[wd]WRLEN-1..0, a, WRLEN/32) LD.D a = rs + s10 * 8 LoadDoublewordVector(WR[wd]WRLEN-1..0, a, WRLEN/64) function LoadByteVector(ts, a, n) /* Implementation defined load ts vector of n bytes from virtual address a. */ endfunction LoadByteVector function LoadHalfwordVector(ts, a, n) /* Implementation defined load ts vector of n halfwords from virtual address a. */ endfunction LoadHalfwordVector function LoadWordVector(ts, a, n) /* Implementation defined load ts vector of n words from virtual address a. */ endfunction LoadWordVector function LoadDoublewordVector(ts, a, n) /* Implementation defined load ts vector of n doublewords from virtual address a. */ endfunction LoadDoublewordVector
Reserved Instruction Exception, MSA Disabled Exception. Data access TLB and Address Error Exceptions.