From: Tom Stellard Date: Wed, 23 May 2012 17:19:36 +0000 (-0400) Subject: radeon/llvm: Add custom SDNode for FRACT X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4984f346320e64b58e38e443e5b99d09b7067bc;p=mesa.git radeon/llvm: Add custom SDNode for FRACT --- diff --git a/src/gallium/drivers/radeon/AMDGPUGenInstrEnums.pl b/src/gallium/drivers/radeon/AMDGPUGenInstrEnums.pl index 2b83273cc87..d346f8ca571 100644 --- a/src/gallium/drivers/radeon/AMDGPUGenInstrEnums.pl +++ b/src/gallium/drivers/radeon/AMDGPUGenInstrEnums.pl @@ -32,7 +32,6 @@ use warnings; use strict; my @F32_MULTICLASSES = qw { - UnaryIntrinsicFloat UnaryIntrinsicFloatScalar }; @@ -55,7 +54,7 @@ my $FILE_TYPE = $ARGV[0]; open AMDIL, '<', 'AMDILInstructions.td'; -my @INST_ENUMS = ('NONE', 'FEQ', 'FGE', 'FLT', 'FNE', 'MOVE_f32', 'MOVE_i32', 'FTOI', 'ITOF', 'UGT', 'IGE', 'INE', 'UGE', 'IEQ', 'BINARY_OR_i32', 'BINARY_NOT_i32'); +my @INST_ENUMS = ('NONE', 'FEQ', 'FGE', 'FLT', 'FNE', 'MOVE_f32', 'MOVE_i32', 'FTOI', 'ITOF', 'UGT', 'IGE', 'INE', 'UGE', 'IEQ', 'BINARY_OR_i32', 'BINARY_NOT_i32', 'ROUND_POSINF_f32', 'ROUND_NEAREST_f32'); while () { if ($_ =~ /defm\s+([A-Z_]+)\s+:\s+([A-Za-z0-9]+); + // out = max(a, b) a and b are floats def AMDGPUfmax : SDNode<"AMDGPUISD::FMAX", SDTFPBinOp, [SDNPCommutative, SDNPAssociative] diff --git a/src/gallium/drivers/radeon/AMDILInstructions.td b/src/gallium/drivers/radeon/AMDILInstructions.td index 8f22d6672fb..f7bf31f6c60 100644 --- a/src/gallium/drivers/radeon/AMDILInstructions.td +++ b/src/gallium/drivers/radeon/AMDILInstructions.td @@ -214,7 +214,6 @@ def LUSHR : TwoInOneOut; -defm FRAC : UnaryIntrinsicFloat; defm PIREDUCE : UnaryIntrinsicFloat; defm ROUND_NEAREST : UnaryIntrinsicFloat; diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td index 978ccecd339..670598fc31d 100644 --- a/src/gallium/drivers/radeon/R600Instructions.td +++ b/src/gallium/drivers/radeon/R600Instructions.td @@ -358,9 +358,8 @@ def SNE : R600_2OP < def FRACT : R600_1OP < 0x10, "FRACT", - []> { - let AMDILOp = AMDILInst.FRAC_f32; -} + [(set R600_Reg32:$dst, (AMDGPUfract R600_Reg32:$src))] +>; def TRUNC : R600_1OP < 0x11, "TRUNC",