Age | Commit message (Collapse) | Author | Files | Lines |
|
Be more elegant in parsing and passing the parameters to
orc_program_append_str_2().
|
|
|
|
Keep track of what const/param is loaded into a temp variable. We can
then see if the const is already loaded in a variable and simply reuse
it instead of using a new temp. We must also make sure we load constants
of different size in different temp variables.
|
|
This reverts commit 2ece711c615d327be1e74bec4844186ced58b0ef.
This reverts commit 2ae41b98a35405dbfd35209e7d68428be77a2e62.
This reverts commit 106dacc2620126dedb99d2b981ba2e5a7d4591f9.
This reverts commit f6697e30681f46f6f3f632ddbbcab98107eec7e0.
These commits are more complicated than needed. A more simple solution
is possible by tracking the registers that hold a certain constant and
simply reusing that register when we can. We can then load the same
constant in different registers of different sizes if needed.
|
|
When we automatically create constants from the opcode arguments, make
different constants per size and rewrite the program to use the newly
created constant.
|
|
|
|
When loading a constant, select the multiplier based on the size of the
opcode argument. This is safer because we have existing code that declares
the constants of the wrong size.
|
|
When loading a const in a register, always make it cover the full
register so that it containts enough values to be used in x2 and
x4 instructions.
|
|
When we detect a constant while parsing a line, register it with the
same size as the argument of the opcode.
|
|
when the variable has a size < 2 it will have been declared as a simple
int8 or int16, when we use this in a X2 or X4 instruction, use the
variable directly instead of trying to use the x fields.
|
|
Generate only 1 temp variable for constants. We do this by keeping track
of what variable we used to replace the constant.
Previously, orc would allocate a new temp variable every time a constant
was used, this wastes registers and is not needed.
|
|
|
|
Cast to unsigned int when doing addition and subtraction that can
overflow.
Cast to unsigned int when doing the lower part of a multiplication.
Cast to unsigned int when doing left shifts into the sign bit.
Regenerate the emulation code. This should avoid multiple warnings
reported with clang and -fsanitize=undefined.
See https://bugzilla.gnome.org/show_bug.cgi?id=728738
|
|
|
|
For instructions that don't have a second variable, don't try to index
the variable array with a -1 index.
|
|
In ORC_READ_UINT32_LE, convert each byte to uint32 before or-ing them
together. This avoids | with signed ints.
|
|
ORC_CPU_FLAGS has been removed quite some time ago
|
|
Previously $TMPDIR and /tmp were the first options to try to use for
intermediate files. To prevent name collisions, now user specific dirs ($HOME
and $XDG_RUNTIME_DIR) are prefered over the user unspecific dirs ($TMP and
/tmp).
https://bugzilla.gnome.org/show_bug.cgi?id=735871
|
|
|
|
|
|
On Android, /proc/self/auxv might not be readable (except
when debuggable=true in the build, annoyingly), so do what
the android cpufeatures detection code does and fall back to
/proc/cpuinfo string matching.
Without this, release builds run really slowly, due to ORC always
doing emulation.
|
|
|
|
|
|
|
|
Fixes these warnings on windows x86_64:
orcarray.c:80:33: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
orcarray.c:80:22: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
|
|
previous compilation
|
|
|
|
See https://github.com/cgwalters/build-api
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We want to ensure no more than, say, 8 constants are added
to a program. Adding more will violate pervasive assumptions
in the code, and may lead to various buffer overflows. By
trapping these add creation time, we prevent these issues
without cluttering the code with range checks. The user is
assumed non malicious here.
Add a test to check we can add up to and including the limit
for a type, but no more.
|
|
|
|
When splitting orc memory chunks in two, the 'prev' pointer of the
new memory chunk to be inserted was wrong, causing invalid memory
access and double frees later down the line.
https://bugzilla.gnome.org/show_bug.cgi?id=731227
|
|
CID 1147011.
|
|
orcarray.c:254:15: error: using integer absolute value function 'abs' when
argument is of floating point type [-Werror,-Wabsolute-value]
if (abs(a[i] - b[i]) < MIN_NONDENORMAL_D) continue;
|
|
Shifting into the sign bit is undefined, so let's stop doing that.
|
|
|
|
|
|
|
|
Ensures another user can't inject code into your process when
winning a race with the ORC temp file code.
Coverity 1147013
|
|
Coverity 1146979, 1146980, 1146977, 1146978, 1146973
|
|
Coverity 1146972
|
|
|
|
|
|
|
|
|