Lines Matching refs:val
897 union kvmppc_one_reg val;
905 val.vval = VCPU_VSX_VR(vcpu, index - 32);
906 val.vsxval[offset] = gpr;
907 VCPU_VSX_VR(vcpu, index - 32) = val.vval;
916 union kvmppc_one_reg val;
920 val.vval = VCPU_VSX_VR(vcpu, index - 32);
921 val.vsxval[0] = gpr;
922 val.vsxval[1] = gpr;
923 VCPU_VSX_VR(vcpu, index - 32) = val.vval;
933 union kvmppc_one_reg val;
937 val.vsx32val[0] = gpr;
938 val.vsx32val[1] = gpr;
939 val.vsx32val[2] = gpr;
940 val.vsx32val[3] = gpr;
941 VCPU_VSX_VR(vcpu, index - 32) = val.vval;
943 val.vsx32val[0] = gpr;
944 val.vsx32val[1] = gpr;
945 VCPU_VSX_FPR(vcpu, index, 0) = val.vsxval[0];
946 VCPU_VSX_FPR(vcpu, index, 1) = val.vsxval[0];
953 union kvmppc_one_reg val;
962 val.vval = VCPU_VSX_VR(vcpu, index - 32);
963 val.vsx32val[offset] = gpr32;
964 VCPU_VSX_VR(vcpu, index - 32) = val.vval;
968 val.vsxval[0] = VCPU_VSX_FPR(vcpu, index, dword_offset);
969 val.vsx32val[word_offset] = gpr32;
970 VCPU_VSX_FPR(vcpu, index, dword_offset) = val.vsxval[0];
1021 union kvmppc_one_reg val;
1029 val.vval = VCPU_VSX_VR(vcpu, index);
1030 val.vsxval[offset] = gpr;
1031 VCPU_VSX_VR(vcpu, index) = val.vval;
1037 union kvmppc_one_reg val;
1045 val.vval = VCPU_VSX_VR(vcpu, index);
1046 val.vsx32val[offset] = gpr32;
1047 VCPU_VSX_VR(vcpu, index) = val.vval;
1053 union kvmppc_one_reg val;
1061 val.vval = VCPU_VSX_VR(vcpu, index);
1062 val.vsx16val[offset] = gpr16;
1063 VCPU_VSX_VR(vcpu, index) = val.vval;
1069 union kvmppc_one_reg val;
1077 val.vval = VCPU_VSX_VR(vcpu, index);
1078 val.vsx8val[offset] = gpr8;
1079 VCPU_VSX_VR(vcpu, index) = val.vval;
1315 u64 val, unsigned int bytes, int is_default_endian)
1341 val = dp_to_sp(val);
1346 case 8: *(u64 *)data = val; break;
1347 case 4: *(u32 *)data = val; break;
1348 case 2: *(u16 *)data = val; break;
1349 case 1: *(u8 *)data = val; break;
1353 case 8: *(u64 *)data = swab64(val); break;
1354 case 4: *(u32 *)data = swab32(val); break;
1355 case 2: *(u16 *)data = swab16(val); break;
1356 case 1: *(u8 *)data = val; break;
1377 static inline int kvmppc_get_vsr_data(struct kvm_vcpu *vcpu, int rs, u64 *val)
1396 *val = VCPU_VSX_FPR(vcpu, rs, vsx_offset);
1399 *val = reg.vsxval[vsx_offset];
1416 *val = reg.vsx32val[word_offset];
1419 *val = reg.vsx32val[vsx_offset];
1434 u64 val;
1444 if (kvmppc_get_vsr_data(vcpu, rs, &val) == -1)
1448 val, bytes, is_default_endian);
1521 static int kvmppc_get_vmx_dword(struct kvm_vcpu *vcpu, int index, u64 *val)
1534 *val = reg.vsxval[vmx_offset];
1539 static int kvmppc_get_vmx_word(struct kvm_vcpu *vcpu, int index, u64 *val)
1552 *val = reg.vsx32val[vmx_offset];
1557 static int kvmppc_get_vmx_hword(struct kvm_vcpu *vcpu, int index, u64 *val)
1570 *val = reg.vsx16val[vmx_offset];
1575 static int kvmppc_get_vmx_byte(struct kvm_vcpu *vcpu, int index, u64 *val)
1588 *val = reg.vsx8val[vmx_offset];
1596 u64 val = 0;
1608 if (kvmppc_get_vmx_dword(vcpu, index, &val) == -1)
1613 if (kvmppc_get_vmx_word(vcpu, index, &val) == -1)
1617 if (kvmppc_get_vmx_hword(vcpu, index, &val) == -1)
1621 if (kvmppc_get_vmx_byte(vcpu, index, &val) == -1)
1628 emulated = kvmppc_handle_store(vcpu, val, bytes,
1679 union kvmppc_one_reg val;
1683 if (size > sizeof(val))
1686 r = kvmppc_get_one_reg(vcpu, reg->id, &val);
1696 val.vval = vcpu->arch.vr.vr[reg->id - KVM_REG_PPC_VR0];
1703 val = get_reg_val(reg->id, vcpu->arch.vr.vscr.u[3]);
1706 val = get_reg_val(reg->id, vcpu->arch.vrsave);
1718 if (copy_to_user((char __user *)(unsigned long)reg->addr, &val, size))
1727 union kvmppc_one_reg val;
1731 if (size > sizeof(val))
1734 if (copy_from_user(&val, (char __user *)(unsigned long)reg->addr, size))
1737 r = kvmppc_set_one_reg(vcpu, reg->id, &val);
1747 vcpu->arch.vr.vr[reg->id - KVM_REG_PPC_VR0] = val.vval;
1754 vcpu->arch.vr.vscr.u[3] = set_reg_val(reg->id, val);
1761 vcpu->arch.vrsave = set_reg_val(reg->id, val);