- 06 Nov, 2015 1 commit
-
-
Reed Kotler authored
This is basically the same patch as for ARM issue 1127003003 https://codereview.chromium.org/1127003003 BUG= https://code.google.com/p/nativeclient/issues/detail?id=4167 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1414383004 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
- 05 Nov, 2015 3 commits
-
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1429073005 .
-
Karl Schimpf authored
Previously, the code assumed that the emit() method of all ARM instructions emitted a single instruction. This is false. Instructions like PUSH and POP may generate multiple instructions. This is only a problem when the hybrid ARM assembler reverts back to using the stand-alone assembler to generate instructions the integrated assembler can't handle. The fix is to add infrastructure to allow ARM instructions to communicate to the assembler, the number of instructions they generate, so that the correct-sized filler is added to the assembly buffer. This fixes all cross-test failures for (pc-relative) branches, except one. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1426513004 .
-
Jim Stichnoth authored
Each TargetLowering subclass has several fields (generally register allocation related) that are initialized to the same values every time a TargetLowering object is created. These fields are essentially const once initialized, so there is no reason to repeatedly initialize them. The solution is to make them static fields, and statically initialize them at program startup. This also makes it practical to access such fields without needing a TargetLowering object. There are likely more items that should also get this treatment, but those can be changed later. The staticInit() method needs a run-once guard because the unit tests actually cause it to be called more than once. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1418853005 .
-
- 04 Nov, 2015 5 commits
-
-
Karl Schimpf authored
Also cleans up instructions that use emitType01 to share more common code. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1413473005 .
-
David Sehr authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1421603003 .
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1414883007 .
-
Karl Schimpf authored
When translating an Variable without a register, the code assumes the variable is on the stack using sp. This is still true. However, if it is a (derived class) StackVariable, the register defined by getBaseRegNum() should be used instead. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1432453003 .
-
Karl Schimpf authored
It turns out that there are several instruction in the ARM integrated assembler that do not get translated correctly. This results in the spec2k tests not being compilable. To workaround this problem, this CL adds a (temporary) flag that allows all translations to be applied by the integrated assembler. When this flag is false (the default) only correctly working translations to be applied by the integrated assembler. This allows lit tests to still be applied to the correct portions of broken translations. This CL also fixes a bug with local (instruction) labels that did not generate a corresponding label to the -filetype=iasm assembly file. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1424923005 .
-
- 02 Nov, 2015 2 commits
-
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1415943009 .
-
Jim Stichnoth authored
"make -f Makefile.standalone check-spec" will translate and run all the spec2k components for a given target. The advantages are that this can be done all within the subzero directory, and the spec components can be run in parallel via "make -j" (particularly helpful for arm32/qemu). Default target is x8632, and arm32 is also available. Example: make -j32 -f Makefile.standalone check-spec TARGET=arm32 SPEC="-O2 --filetype=iasm" Also removes unnecessary tab characters from the makefile, fixes >80-column lines, and gives more consistent indentation. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1413033009 .
-
- 31 Oct, 2015 1 commit
-
-
Jim Stichnoth authored
If the alloca alignment exceeds the known ABI stack alignment, the lowering sequence adds an "and esp, xxx" instruction. In this case, the esp adjustment is no longer statically known, so we must force an ebp-based frame. BUG= none R=sehr@google.com Review URL: https://codereview.chromium.org/1426933003 .
-
- 30 Oct, 2015 12 commits
-
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1403403009 .
-
Karl Schimpf authored
BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1425243002 .
-
Karl Schimpf authored
Also cleans up comments on rotated immediate 8 constants. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1414483008 .
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1427023004 .
-
Jim Stichnoth authored
Somehow missed this in https://codereview.chromium.org/1419173006 . BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1410813004 .
-
Karl Schimpf authored
Also clean up some comments on where code was moved from in Dart sourced. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1429003002 .
-
Karl Schimpf authored
BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1424353003 .
-
Jim Stichnoth authored
This makes it easier to copy the commands and run them manually. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1419173006 .
-
Karl Schimpf authored
Also factor out code to process arguments for data operations into new method Arm32::Assembler32::emitType01(). BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1406153011 .
-
Karl Schimpf authored
Also cleans up comments about handling a rotated imm8 value. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1412923006 .
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1431453002 .
-
Karl Schimpf authored
Also cleans up a couple of template definitions by using the appropriate "using" type name. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1430713003 .
-
- 29 Oct, 2015 3 commits
-
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1412293006 .
-
Karl Schimpf authored
Adds a new type of fixup to handle the relocatable fixups needed for movw and movt on a global addresses. Also adds movw and movt methods to the ARM assembler. Also makes ARM register names visible (without a target lowering object), so that the ARM integrated assembler can generate the appropriate assembly. Note that the integrated assembler needs to generate the corresponding movw/movt, and follows the instruction with the bytes that appear in the corresponding assembler buffer. This allows the ability to test if we have generated the correct values, and will be set up properly for ELF emission. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1424863005 .
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1424213003 .
-
- 28 Oct, 2015 2 commits
-
-
Jim Stichnoth authored
Sets the stage for enabling the use of the 8-bit high registers, but doesn't yet turn it on because more work is needed for correctness. In the lowering, typing is tightened up so that we don't specify e.g. eax when we really mean ax or al. This gets rid of the ShiftHack hack. The one exception is the pinsr instruction which always requires an r32 register even if the memory operand is m8 or m16. The x86 assembler unit tests are fixed, by not passing a GlobalContext arg to the Assembler ctor. Many constexpr and "auto *" upgrades are applied. Sorry for not putting this into a separate CL - a few local fixes got out of hand... Tested in the following ways: - "make check-lit" - some .ll CHECK line changes due to register randomization - "make check-xtest" - "make check-xtest" with forced filetype=asm (via local .py hack) - spec2k with all -filetype options - compare before-and-after spec2k filetype=asm output - a few differences where the correct narrow register is used instead of the full-width register To do in the next CL: 1. Add new register classes: (a) 32-bit GPR truncable to 8-bit (eax, ecx, edx, ebx) (b) 16-bit GPR truncable to 8-bit (ax, cx, dx, bx) (c) 8-bit truncable from 16/32-bit (al, bl, cl, dl) (c) 8-bit "mov"able from ah/bh/ch/dh 2. Enable use of ah/bh/ch/dh for x86-32. 3. Enable use of ah (but skip bh/ch/dh) for x86-64. 4. Statically initialize register tables in the TargetLowering subclass. BUG= none R=jpp@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/1419903002 .
-
John Porto authored
Implements the Availability optimization: a = b x = f(a, c) becomes a = b x = f(b, c) This only triggers if b is an infinite-weight temporary, and it prevents a potential spill at the cost of higher register pressure. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1424873003 .
-
- 27 Oct, 2015 5 commits
-
-
David Sehr authored
This adds some more patterns to address mode recovery to recover ConstantRelocatables as displacements, and a few more generalizations that catch indexed addressing. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1428443002 .
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1410183004 .
-
Karl Schimpf authored
Fixes a couple of bugs that stopped the ARM integrated assembler from generating assembly code for any spec2k examples. Fixes are: 1) Handle conditional branches with no else branch. 2) Fix usage of fixups so that the emit method does any needed buffer lookups. This fixes case where textual fixups (with zero length) appear at the end of the assembly file. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1417173003 .
-
Karl Schimpf authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1424773002 .
-
Karl Schimpf authored
Adds an explicit branch instruction (near form only), which allows branching from the current pc up to 2**26 bytes (in either direction). For now, this near restriction (within a function) doesn't appear to be a bad restriction, and only near jumps have been implemented. Also fixes notationally the concepts of the following types: InstValueType : The 32-bit encoding of an instruction value. InstOffsetType : Offset (+/-) used within an instruction. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1418313003 .
-
- 23 Oct, 2015 1 commit
-
-
Karl Schimpf authored
Fixes an issue where branches don't compile in the hybrid integrated assembler because some jump instructions have not yet been integrated. It does this by adding an instruction label for each corresponding label generated by the standalone ARM assembler. Note that in order to fix this, I had to change the signature of virtual method Assembler::bindCfgNodeLabel to get the Cfg node (rather than the index value). This allows the ARM hybrid assembler to generate a label for each CfgNode (using the getAsmName() method). BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1407273006 .
-
- 22 Oct, 2015 1 commit
-
-
Karl Schimpf authored
Adds a notion of a hybrid assembler. That is, if the integrated assembler can lower an instruction to bytes, it does. Otherwise, it uses the standalone assembler to generate text as the placeholder for the instruction. This is done using a textual fixup in the assembly buffer. The advantage of the hybrid assembler is that one can incrementally implement the integrated assembler and still test the generated assembly. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1418523002 .
-
- 21 Oct, 2015 1 commit
-
-
Jim Stichnoth authored
This patch is essentially the same as for ARM https://codereview.chromium.org/1127963004 I have incorporated the new 64 bit register work which was not available at the time of this earlier patch. The MIPS O32 Abi is not perfect on this patch but I am more or less following the development of the ARM patches and those were preliminary at this stage too. I will make corrections in a later patch when I incorporate more of the ARM patches. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4167 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1416493002 .
-
- 17 Oct, 2015 1 commit
-
-
Karl Schimpf authored
Also cleans up comments and condition violations for all implemented ARM instructions. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1411873002 .
-
- 16 Oct, 2015 2 commits
-
-
Jim Stichnoth authored
BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1407263005 .
-
David Sehr authored
Generalize folding of icmp instructions into br. 64-bit comparisons are considered as candidates unless they feed a select. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1407143002 .
-