- 07 Jan, 2016 5 commits
-
-
Karl Schimpf authored
Also fixes some badly named locals for VSUBS and VSUBD. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1568933002 .
-
Karl Schimpf authored
Also adds missing test case for the VADDD instruction. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1568623003 .
-
Reed Kotler authored
Move Doxyfile files to docs and associated makefile. This is a prelude to allowing a docs directory for all the RST files as well as expanding the makefile to build the docs for those too, not just the doxygen output. The doxygen html has been moved to build/docs/html so it's not in a source directory. Gitignore has been fixed to allow files in docs now without complaining. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1562703002 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1540653003 .
-
Reed Kotler authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1562543002 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
- 06 Jan, 2016 1 commit
-
-
Jim Stichnoth authored
The driver programs for vector tests use a loop to initialize vector-type values one element at a time. The PNaCl ABI requires the vector element index to be a constant, and the createConstantInsertExtractElementIndexPass() transformation creates an alloca instruction. When this alloca is inside a loop, it can (and does in the cross tests) cause a stack overflow. The workaround here is to use a noinline helper function to do the insertelement. We didn't run into this problem until now because native and sandbox cross tests build the driver in a different way that presumably avoids running the PNaCl ABI simplification passes. BUG= none R=jpp@chromium.org Review URL: https://codereview.chromium.org/1560933002 .
-
- 04 Jan, 2016 4 commits
-
-
Jim Stichnoth authored
The basic model is that each translated function begins with a special "GotVar = getIP" instruction, and each ConstantRelocatable reference is changed to GotVar+ConstantRelocatable@GOTOFF (assuming GotVar is legalized into a physical register). The getIP instruction is late-lowered into: call __Sz_getIP_<reg> add <reg>, $_GLOBAL_OFFSET_TABLE_ mov GotVar, <reg> Note that _GLOBAL_OFFSET_TABLE_ gets a special relocation type. The register allocator takes GotVar uses into account, giving appropriate weight toward register allocation. If there are no uses of GotVar, the getIP instruction gets naturally dead-code eliminated. Special treatment is needed to prevent this elimination when the only GotVar uses are for (floating point) constant pool values from Phi instructions, since the Phi lowering with its GotVar legalization happens after the main round of register allocation. The x86 mem operand now has a IsPIC field to indicate whether it has been PIC-legalized. Mem operands are sometimes legalized more than once, and this IsPIC field keeps GotVar from being added more than once. We have to limit the aggressiveness of address mode inference, to make sure a register slot is left for the GotVar. The Subzero runtime has new asm files to implement all possible __Sz_getIP_<reg> helpers. The szbuild.py script and the spec2k version support Non-SFI builds. Running spec2k depends on a pending change to the spec2k run_all.sh script. Read-only data sections need to be named .data.rel.ro instead of .rodata because of PIC rules. Most cross tests are working, but there is some problem with vector types that seems to be not Subzero related, so most vector tests are disabled for now. Still to do: * Fix "--nonsfi --filetype=iasm". The llvm-mc assembler doesn't properly apply the _GLOBAL_OFFSET_TABLE_ relocation in iasm mode. Maybe I can find a different syntactic trick that works, or use hybrid iasm for this limited case. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4327 R=jpp@chromium.org Review URL: https://codereview.chromium.org/1506653002 .
-
John Porto authored
This CL modifies the ARM32 backend so that the REGARM32_TABLE is only expanded once (to initialize a constexpr array.) This change decreased the backend size in roughly ~80k. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1554263002 .
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1554203002 .
-
John Porto authored
This CL does more than any CL should. First, it moves all target-specific classes (TargetLowering, Assembler, and Instructions) to a target-specific namespace. For example, the ::Ice::TargetX8632 class now lives in ::Ice::X8632::TargetX8632. Same goes for ARM32, X8664, and MIPS32. Now, we have a ton of redundant prefixes (it should be pretty obvious that ::Ice::X8632::TargetLowering is an X8632 target lowering), but this is definitively not something for this CL. Second, this CL gets rid of the excessive use of 'typename Foo::Bar' in the X86 templates. These changes appear more intimidating than they really are, and they were fairly mechanical. Third, the x86?? Traitses (gollum!) classes are no longer template instatiation. The previous X86 templates were parameterized with a X86 TargetLowering, and they assumed that a MachineTraits<Target> was defined for that TargetLowering. The X86 templates are now parameterized with a TraitsType, and different backends may have completely unrelated traits. Fourth, the X86 templates are no longer members of ::Ice::X86Internal. Instead, each file #include'ing a Ice*X86Base.h file need to #define X86NAMESPACE to the namespace where the backend is being defined. With this change, the template instantiation for X8632 live in ::Ice::X8632, and, for X8664, in ::Ice::X8664. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1548363002 .
-
- 30 Dec, 2015 2 commits
-
-
John Porto authored
initRegisterSet() for x8632 and x8664 were both huge. This CL refactors those methods to use a pre-initialized table instead of the result of expanding the x-macros. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1546373003 .
-
John Porto authored
This is the first step towards hiding backend-specific stuff from the rest of subzero. In this CL, all the references to target-specific files (e.g., IceTargetLoweringX8632.h) are removed from target-independent files. This CL also changes the named constructors in the Target-specific classes (e.g., TargetX8632::create()) to return unique_ptrs. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1551633002 .
-
- 28 Dec, 2015 2 commits
-
-
Reed Kotler authored
This assumes patch from 1534883005 though still needs to rename validateAndGenerateBuildAttributes to dumpBuildAttributes BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1541063002 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
Reed Kotler authored
This is a first cut at this. More can be done and much of this is just moving what is already in the help for the commands into Doxygen comments. The documentation can be expanded to better describe the role of the various command line options. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1547743002 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
- 24 Dec, 2015 1 commit
-
-
John Porto authored
Fixes filetype=asm for x8664. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4077 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1543573002 .
-
- 22 Dec, 2015 2 commits
-
-
Reed Kotler authored
there is no way for these values of build attributes to be other than 0,1 by c++ rules since they are constexpr bool. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1534883005 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
John Porto authored
After a hiatus while x32 was not available in nacl's llvm, x8664 is being revived. Rejoice! The Target is now back to where it was before: the crosstests pass, and SPEC2k builds and verifies. Makefile.standalone still has the crosstests for x8664 disabled while we wait for all the plumbing that's needed for x32 support on nacl's toolchain to be available. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4077 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1537703002 .
-
- 20 Dec, 2015 1 commit
-
-
Reed Kotler authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1538173002 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
- 18 Dec, 2015 9 commits
-
-
Karl Schimpf authored
BUG=None R=sehr@chromium.org Review URL: https://codereview.chromium.org/1534133003 .
-
Karl Schimpf authored
Also fixes the corresponding emit methods for vpush and vpop to match constraint that the maximum number of consecutive registers that can be pushed/popped is 16. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1532233002 .
-
Karl Schimpf authored
Both the X86 and ARM header files define "Adjuststack" in the enumeration of target specific opcodes. However, it is not used in either. Removing constant from the enumeration since it is not used. BUG= None R=sehr@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1527363004 .
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1530233004 .
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1538443003 .
-
David Sehr authored
BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1531303004 .
-
Reed Kotler authored
this fixes a lot of problems with the doxygen. for example with this, now doxygen correctly understands the cl::opt variables in ClFlags.cpp as variables, whereas previously it thought they were functions. it's possible to make the llvm includes more selective but this is a good first cut and better than including all of llvm includes. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1536773003 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
Reed Kotler authored
this is added for both standard doxygen and clang assisted doxygen (which cannot be turned on yet without some additions to the third-party toolchain but can be used locally). the predefines here are the defaults when subzero is built. not having these creates the bigger issue when clang assisted parsing is enabled but should be there always. BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1533963002 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
Reed Kotler authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1527173002 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
- 17 Dec, 2015 5 commits
-
-
David Sehr authored
BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1530423002 .
-
Karl Schimpf authored
Uses the same UDF instruction as used for function alignment. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1519873003 .
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1516863003 .
-
Karl Schimpf authored
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1521133002 .
-
John Porto authored
Emitting an instruction in Subzero requires a fair amount of boilerplated code: Context.insert(<InstType>::create(Func, <Args>...)); The ordeal is worse if one needs access to the recently create instructionL auto *Instr = <InstType>::create(Func, <Args>...); Context.insert(Instr); Instr->... This CL introduces a new LoweringContext::insert() method: template <<InstType>, <Args>...> <InstType> *LoweringContext::insert(<Args>...) { auto *New = Inst::create(Node.Cfg, <Args>...); insert(New); return New; } This is essentially a syntatic sugar that allows instructions to be emitted by using Context.insert<InstType>(<Args>...); The compiler should be able to inline the calls (and get rid of the return value) when appropriate. make bloat reviews a small increase in translator code size BUG= R=sehr@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1527143003 .
-
- 16 Dec, 2015 5 commits
-
-
Jim Stichnoth authored
The llvm-mc assembler for x86 uses '#' to start a mid-line comment, while arm32 uses '@'. Those characters cause syntax errors for the other architecture. There doesn't seem to be a common character for starting mid-line comments. However, the /* ... */ style comment works in both (all?) cases. (The '#' character at the start of a line, preceded by optional whitespace, starts a comment in both cases.) BUG= none TEST= ./pydir/szbuild_spec2k.py --force -v -O2 --filetype=asm --sz=--asm-verbose --target=arm32 TEST= ./pydir/szbuild_spec2k.py --force -v -O2 --filetype=asm --sz=--asm-verbose --target=x8632 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1521863002 .
-
John Porto authored
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=kschimpf@google.com Review URL: https://codereview.chromium.org/1528413002 .
-
John Porto authored
The ARM32 backend used to rely on a specific register declaration order for calling convention register assignment. This CL introduces a new field in the ARM32 register tables for explicitly setting which register holds which parameter. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4076 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1508423003 .
-
Jim Stichnoth authored
Instead of output like this: Str << "\tmov\t" << ... we prefer to use string concatenation: Str << "\t" "mov\t" << ... That way, "git grep -w mov" can be used for more precise pattern matching. BUG= none R=kschimpf@google.com Review URL: https://codereview.chromium.org/1523873003 .
-
David Sehr authored
Allows the optimization of pairs of operations, including 64-bit compares and selects as well as preparing for idioms (minsd, maxsd, etc.). BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1497033002 .
-
- 15 Dec, 2015 2 commits
-
-
Reed Kotler authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1522213002 . Patch from Reed Kotler <rkotlerimgtec@gmail.com>.
-
Jim Stichnoth authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1520383002 .
-
- 14 Dec, 2015 1 commit
-
-
Jim Stichnoth authored
BUG= R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1522433004 .
-