mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
jay: inline jay_control()
This accessor is more opaque imho. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41215>
This commit is contained in:
parent
978d20e5fe
commit
b9f8f2477e
2 changed files with 6 additions and 13 deletions
|
|
@ -6,13 +6,15 @@
|
|||
#include "jay_ir.h"
|
||||
|
||||
static void
|
||||
set_cr0(jay_function *f, jay_cursor cursor, uint32_t *cr0, uint32_t desired)
|
||||
set_cr0(jay_function *f, jay_cursor cursor, uint32_t *existing, uint32_t desired)
|
||||
{
|
||||
/* Only touch cr0 if we are changing bits */
|
||||
if ((*cr0) != desired) {
|
||||
if ((*existing) != desired) {
|
||||
jay_builder b = jay_init_builder(f, cursor);
|
||||
jay_XOR(&b, JAY_TYPE_U32, jay_control(), jay_control(), (*cr0) ^ desired);
|
||||
*cr0 = desired;
|
||||
jay_def cr0 = jay_scalar(J_ARF, JAY_ARF_CONTROL);
|
||||
|
||||
jay_XOR(&b, JAY_TYPE_U32, cr0, cr0, (*existing) ^ desired);
|
||||
*existing = desired;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -413,15 +413,6 @@ jay_regs_equal(jay_def a, jay_def b)
|
|||
a.reg == b.reg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a reference to the control (cr0) architecture register.
|
||||
*/
|
||||
static inline jay_def
|
||||
jay_control(void)
|
||||
{
|
||||
return jay_scalar(J_ARF, JAY_ARF_CONTROL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct an immediate from a floating point constant.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue