|
From: Florian K. <br...@ac...> - 2012-01-04 15:23:44
|
On 12/29/2011 11:15 AM, Florian Krohm wrote:
>>
>> QUANTIZE AND ROUND INSTRUCTIONS
>> -------------------------------
>> EXTRACT AND INSERT INSTRUCTIONS
>> -------------------------------
>
> Do we need to support these at all? In other words, does GCC issue these
> or do they show up in hand crafted assembler shipped with GCC/GLIBC?
> I don't know but will find out (for s390).
>
Yes, we need to support them. They are used in libdfp.
s390 also has an "extract significance" opcode which extracts the
significant digits of a DFP number and converts them to a signed 64-bit
integer. It's also used in libdfp.
Iop_ExtractSigD64 D64 -> I64
Iop_ExtractSigD128 D128 -> I64
>>
>> FORMAT CONVERSION INSTRUCTIONS
>> Iop s390 Power Description of instruction,
> implementation
>> opcode opcode details
>>
>> ---------------------------------------------------------------------
>> TBD
>> PFPO
>> The PFPO instruction operation is
>
> To be done....
>
The PFPO insn is used to convert between binary floating point and
decimal floating point. Since we have 3 formats each, that makes 9
conversion ops for each direction:
Iop_D32toF32 IRRoundingMode(I32) x D32 -> F32
Iop_D32toF64 IRRoundingMode(I32) x D32 -> F64
Iop_D32toF128 IRRoundingMode(I32) x D32 -> F128
Iop_D64toF32 IRRoundingMode(I32) x D64 -> F32
Iop_D64toF64 IRRoundingMode(I32) x D64 -> F64
Iop_D64toF128 IRRoundingMode(I32) x D64 -> F128
Iop_D128toF32 IRRoundingMode(I32) x D128 -> F32
Iop_D128toF64 IRRoundingMode(I32) x D128 -> F64
Iop_D128toF128 IRRoundingMode(I32) x D128 -> F128
Iop_F32toD32 IRRoundingMode(I32) x F32 -> D32
Iop_F32toD64 IRRoundingMode(I32) x F32 -> D64
Iop_F32toD128 IRRoundingMode(I32) x F32 -> D128
Iop_F64toD32 IRRoundingMode(I32) x F64 -> D32
Iop_F64toD64 IRRoundingMode(I32) x F64 -> D64
Iop_F64toD128 IRRoundingMode(I32) x F64 -> D128
Iop_F128toD32 IRRoundingMode(I32) x F128 -> D32
Iop_F128toD64 IRRoundingMode(I32) x F128 -> D64
Iop_F128toD128 IRRoundingMode(I32) x F128 -> D128
I haven't studied the details of the formats so I'm not sure that a
rounding mode is needed for some of the conversions. PFPO allows the
specification of a rounding mode in all cases but that doesn't mean it's
needed..
Anybody has insight into this?
The s390 maintainer for GCC confirmed that these conversions are in fact
all used.
Florian
|