[Mesa-dev] [PATCH 2/3] R600: Export is emitted as a CF_NATIVE inst

Tom Stellard tom at stellard.net
Thu Apr 11 07:51:19 PDT 2013


On Wed, Apr 10, 2013 at 11:04:21PM +0200, Vincent Lejeune wrote:
> ---
>  lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp | 15 +++++----------
>  lib/Target/R600/R600Instructions.td                |  8 ++++----
>  2 files changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
> index 469a8ad..416d710 100644
> --- a/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
> +++ b/lib/Target/R600/MCTargetDesc/R600MCCodeEmitter.cpp
> @@ -250,15 +250,6 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
>        Emit(Word2, OS);
>        break;
>      }
> -    case AMDGPU::EG_ExportSwz:
> -    case AMDGPU::R600_ExportSwz:
> -    case AMDGPU::EG_ExportBuf:
> -    case AMDGPU::R600_ExportBuf: {
> -      uint64_t Inst = getBinaryCodeForInstr(MI, Fixups);
> -      EmitByte(INSTR_EXPORT, OS);
> -      Emit(Inst, OS);
> -      break;
> -    }
>      case AMDGPU::CF_ALU:
>      case AMDGPU::CF_ALU_PUSH_BEFORE: {
>        uint64_t Inst = getBinaryCodeForInstr(MI, Fixups);
> @@ -286,7 +277,11 @@ void R600MCCodeEmitter::EncodeInstruction(const MCInst &MI, raw_ostream &OS,
>      case AMDGPU::CF_CONTINUE_R600:
>      case AMDGPU::CF_JUMP_R600:
>      case AMDGPU::CF_ELSE_R600:
> -    case AMDGPU::POP_R600: {
> +    case AMDGPU::POP_R600:
> +    case AMDGPU::EG_ExportSwz:
> +    case AMDGPU::R600_ExportSwz:
> +    case AMDGPU::EG_ExportBuf:
> +    case AMDGPU::R600_ExportBuf: {
>        uint64_t Inst = getBinaryCodeForInstr(MI, Fixups);
>        EmitByte(INSTR_NATIVE, OS);
>        Emit(Inst, OS);
> diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td
> index b4c45e1..2e9a8a3 100644
> --- a/lib/Target/R600/R600Instructions.td
> +++ b/lib/Target/R600/R600Instructions.td
> @@ -1423,7 +1423,7 @@ let Predicates = [isR600] in {
>      (MUL R600_Reg32:$src, (RECIPSQRT_CLAMPED_r600 R600_Reg32:$src))>;
>  
>    def R600_ExportSwz : ExportSwzInst {
> -    let Word1{20-17} = 1; // BURST_COUNT
> +    let Word1{20-17} = 0; // BURST_COUNT

Why are you changing the BURST_COUNT here ?

>      let Word1{21} = eop;
>      let Word1{22} = 1; // VALID_PIXEL_MODE
>      let Word1{30-23} = inst;
> @@ -1432,7 +1432,7 @@ let Predicates = [isR600] in {
>    defm : ExportPattern<R600_ExportSwz, 39>;
>  
>    def R600_ExportBuf : ExportBufInst {
> -    let Word1{20-17} = 1; // BURST_COUNT
> +    let Word1{20-17} = 0; // BURST_COUNT
>      let Word1{21} = eop;
>      let Word1{22} = 1; // VALID_PIXEL_MODE
>      let Word1{30-23} = inst;
> @@ -1622,7 +1622,7 @@ let hasSideEffects = 1 in {
>      (FLT_TO_UINT_eg (TRUNC R600_Reg32:$src0))>;
>  
>    def EG_ExportSwz : ExportSwzInst {
> -    let Word1{19-16} = 1; // BURST_COUNT
> +    let Word1{19-16} = 0; // BURST_COUNT
>      let Word1{20} = 1; // VALID_PIXEL_MODE
>      let Word1{21} = eop;
>      let Word1{29-22} = inst;
> @@ -1632,7 +1632,7 @@ let hasSideEffects = 1 in {
>    defm : ExportPattern<EG_ExportSwz, 83>;
>  
>    def EG_ExportBuf : ExportBufInst {
> -    let Word1{19-16} = 1; // BURST_COUNT
> +    let Word1{19-16} = 0; // BURST_COUNT
>      let Word1{20} = 1; // VALID_PIXEL_MODE
>      let Word1{21} = eop;
>      let Word1{29-22} = inst;
> -- 
> 1.8.1.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list