search for: type_u16

Displaying 20 results from an estimated 28 matches for "type_u16".

2016 Sep 27
2
[PATCH] nv50/ir: constant fold OP_SPLIT
...lse); + if (i->sType == TYPE_U64 || i->sType == TYPE_S64) { + shift = 32; + type = (i->sType == TYPE_U64) ? TYPE_U32 : TYPE_S32; + } + if (i->sType == TYPE_U32 || i->sType == TYPE_S32) { + shift = 16; + type = (i->sType == TYPE_U32) ? TYPE_U16 : TYPE_S16; + } + if (i->sType == TYPE_U16 || i->sType == TYPE_S16) { + shift = 8; + type = (i->sType == TYPE_U16) ? TYPE_U8 : TYPE_S8; + } + if (type != TYPE_NONE) { + bld.mkMov(i->getDef(0), bld.mkImm(imm0.reg.data.u64 >> shift), type)...
2016 Sep 30
2
[PATCH] nv50/ir: constant fold OP_SPLIT
...e == TYPE_S64) { >> + shift = 32; >> + type = (i->sType == TYPE_U64) ? TYPE_U32 : TYPE_S32; >> + } >> + if (i->sType == TYPE_U32 || i->sType == TYPE_S32) { >> + shift = 16; >> + type = (i->sType == TYPE_U32) ? TYPE_U16 : TYPE_S16; >> + } >> + if (i->sType == TYPE_U16 || i->sType == TYPE_S16) { >> + shift = 8; >> + type = (i->sType == TYPE_U16) ? TYPE_U8 : TYPE_S8; >> + } > shift = typeSizeOf(i->dType); > >> + if (type != TYP...
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...OP_MOV; >>>> break; >>>> } >>>> + case OP_CVT: { >>>> + Storage res; >>>> + bld.setPosition(i, true); /* make sure bld is init'ed */ >>>> + switch(i->dType) { >>>> + case TYPE_U16: >>>> + switch (i->sType) { >>>> + case TYPE_F32: >>>> + if (i->saturate) >>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>> + UI...
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...mediateValue &imm0, int s) >> i->op = OP_MOV; >> break; >> } >> + case OP_CVT: { >> + Storage res; >> + bld.setPosition(i, true); /* make sure bld is init'ed */ >> + switch(i->dType) { >> + case TYPE_U16: >> + switch (i->sType) { >> + case TYPE_F32: >> + if (i->saturate) >> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >> + UINT16_MAX)); > Where did this saturate...
2015 Jan 09
3
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...peephole.cpp @@ -997,6 +997,115 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) i->op = OP_MOV; break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.dat...
2014 Jul 05
1
[PATCH v4] nv50/ir: Handle OP_CVT when folding constant expressions
...peephole.cpp @@ -970,6 +970,127 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) i->op = OP_MOV; break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) { + int32_t conv = util_iround(imm0.reg.data.f32); + res.data.u16 = (conv < 0) ? 0 : CLAMP((uint32_t)conv, 0, + UINT16_MAX);...
2015 Jan 11
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...;>>>> } >>>>>> + case OP_CVT: { >>>>>> + Storage res; >>>>>> + bld.setPosition(i, true); /* make sure bld is init'ed */ >>>>>> + switch(i->dType) { >>>>>> + case TYPE_U16: >>>>>> + switch (i->sType) { >>>>>> + case TYPE_F32: >>>>>> + if (i->saturate) >>>>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>>>> +...
2015 Jan 10
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
..._peephole.cpp @@ -997,6 +997,87 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) i->op = OP_MOV; break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.dat...
2016 Sep 28
0
[PATCH] nv50/ir: constant fold OP_SPLIT
...= TYPE_U64 || i->sType == TYPE_S64) { > + shift = 32; > + type = (i->sType == TYPE_U64) ? TYPE_U32 : TYPE_S32; > + } > + if (i->sType == TYPE_U32 || i->sType == TYPE_S32) { > + shift = 16; > + type = (i->sType == TYPE_U32) ? TYPE_U16 : TYPE_S16; > + } > + if (i->sType == TYPE_U16 || i->sType == TYPE_S16) { > + shift = 8; > + type = (i->sType == TYPE_U16) ? TYPE_U8 : TYPE_S8; > + } shift = typeSizeOf(i->dType); > + if (type != TYPE_NONE) { > + bld.mkM...
2016 Sep 30
0
[PATCH] nv50/ir: constant fold OP_SPLIT
...;> + shift = 32; >>> + type = (i->sType == TYPE_U64) ? TYPE_U32 : TYPE_S32; >>> + } >>> + if (i->sType == TYPE_U32 || i->sType == TYPE_S32) { >>> + shift = 16; >>> + type = (i->sType == TYPE_U32) ? TYPE_U16 : TYPE_S16; >>> + } >>> + if (i->sType == TYPE_U16 || i->sType == TYPE_S16) { >>> + shift = 8; >>> + type = (i->sType == TYPE_U16) ? TYPE_U8 : TYPE_S8; >>> + } >> >> shift = typeSizeOf(i->dType); &gt...
2014 Jul 03
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...eephole.cpp @@ -970,6 +970,80 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) i->op = OP_MOV; break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: res.data.u16 = util_iround(imm0.reg.data.f32); break; + case TYPE_F64: res.data.u16 = util_iround(imm0.reg.data.f64); break; + default: + return; + } + i->setSrc(0, bld.mkImm(res.data.u16)); +...
2014 Jul 06
0
[PATCH v5] nv50/ir: Handle OP_CVT when folding constant expressions
...peephole.cpp @@ -970,6 +970,127 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) i->op = OP_MOV; break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.dat...
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...antFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) > i->op = OP_MOV; > break; > } > + case OP_CVT: { > + Storage res; > + bld.setPosition(i, true); /* make sure bld is init'ed */ > + switch(i->dType) { > + case TYPE_U16: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT16_MAX)); > + else > + res.d...
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...; break; >>>>> } >>>>> + case OP_CVT: { >>>>> + Storage res; >>>>> + bld.setPosition(i, true); /* make sure bld is init'ed */ >>>>> + switch(i->dType) { >>>>> + case TYPE_U16: >>>>> + switch (i->sType) { >>>>> + case TYPE_F32: >>>>> + if (i->saturate) >>>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>>> +...
2014 Jul 03
1
[PATCH v3 1/2] nv50/ir: Add support for the double Type to BuildUtil
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de> --- .../drivers/nouveau/codegen/nv50_ir_build_util.cpp | 17 +++++++++++++++++ .../drivers/nouveau/codegen/nv50_ir_build_util.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp
2015 Jan 11
0
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...gt;>> i->op = OP_MOV; >>> break; >>> } >>> + case OP_CVT: { >>> + Storage res; >>> + bld.setPosition(i, true); /* make sure bld is init'ed */ >>> + switch(i->dType) { >>> + case TYPE_U16: >>> + switch (i->sType) { >>> + case TYPE_F32: >>> + if (i->saturate) >>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>> + UINT16_MAX)); >>...
2015 Jan 11
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
..._peephole.cpp @@ -997,6 +997,79 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) i->op = OP_MOV; break; } + case OP_CVT: { + Storage res; + bld.setPosition(i, true); /* make sure bld is init'ed */ + switch(i->dType) { + case TYPE_U16: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT16_MAX)); + else + res.data.u16 = util_iround(imm0.reg.data...
2015 Jan 11
2
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...gt;>> i->op = OP_MOV; >>> break; >>> } >>> + case OP_CVT: { >>> + Storage res; >>> + bld.setPosition(i, true); /* make sure bld is init'ed */ >>> + switch(i->dType) { >>> + case TYPE_U16: >>> + switch (i->sType) { >>> + case TYPE_F32: >>> + if (i->saturate) >>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>> + UINT16_MAX)); >>...
2015 Jan 11
0
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...; break; >>>>> } >>>>> + case OP_CVT: { >>>>> + Storage res; >>>>> + bld.setPosition(i, true); /* make sure bld is init'ed */ >>>>> + switch(i->dType) { >>>>> + case TYPE_U16: >>>>> + switch (i->sType) { >>>>> + case TYPE_F32: >>>>> + if (i->saturate) >>>>> + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, >>>>> +...
2015 Jan 11
0
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...antFolding::opnd(Instruction *i, ImmediateValue &imm0, int s) > i->op = OP_MOV; > break; > } > + case OP_CVT: { > + Storage res; > + bld.setPosition(i, true); /* make sure bld is init'ed */ > + switch(i->dType) { > + case TYPE_U16: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u16 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT16_MAX)); Where did this saturate stuff come from? It doe...