mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
gallium: added ppc_vload_float(), for limited cases
This commit is contained in:
parent
da63edd720
commit
b06d072019
2 changed files with 22 additions and 0 deletions
|
|
@ -603,6 +603,24 @@ ppc_lvewx(struct ppc_function *p, uint vr, uint ra, uint rb)
|
|||
emit_x(p, 31, vr, ra, rb, 71);
|
||||
}
|
||||
|
||||
/** vector load float: vr = splats(imm) */
|
||||
void
|
||||
ppc_vload_float(struct ppc_function *p, uint vr, float imm)
|
||||
{
|
||||
if (imm == 0.0f) {
|
||||
ppc_vxor(p, vr, vr, vr);
|
||||
}
|
||||
else if (imm == 1.0f) {
|
||||
/* use 2^0=1 to get 1.0 */
|
||||
ppc_vxor(p, vr, vr, vr); /* vr = {0,0,0,0} */
|
||||
ppc_vexptefp(p, vr, vr); /* vr = 0^0 */
|
||||
}
|
||||
else {
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -158,6 +158,10 @@ ppc_lvx(struct ppc_function *p, uint vR, uint vA, uint vB);
|
|||
extern void
|
||||
ppc_lvewx(struct ppc_function *p, uint vR, uint vA, uint vB);
|
||||
|
||||
/** vector load float: vr = splats(imm) */
|
||||
extern void
|
||||
ppc_vload_float(struct ppc_function *p, uint vr, float imm);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue