mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01:00
nv50/codegen: do not emitATOM() if the subOp is unknown
For debug build we'll hit the assert, for release we are going to emit random data
as subOp is used uninitilised. Spotted by gcc
codegen/nv50_ir_emit_nv50.cpp: In member function 'void nv50_ir::CodeEmitterNV50::emitATOM(const nv50_ir::Instruction*)':
codegen/nv50_ir_emit_nv50.cpp:1554:12: warning: 'subOp' may be used uninitialized in this function [-Wmaybe-uninitialized]
uint8_t subOp;
^
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
4da54c91d2
commit
249f3d73cf
1 changed files with 1 additions and 1 deletions
|
|
@ -1565,7 +1565,7 @@ CodeEmitterNV50::emitATOM(const Instruction *i)
|
|||
case NV50_IR_SUBOP_ATOM_EXCH: subOp = 0x1; break;
|
||||
default:
|
||||
assert(!"invalid subop");
|
||||
break;
|
||||
return;
|
||||
}
|
||||
code[0] = 0xd0000001;
|
||||
code[1] = 0xe0c00000 | (subOp << 2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue