Age | Commit message (Collapse) | Author |
|
Change the writer to strip pointer types from intrinsics' argument and
return types, replacing them with i32. This simplifies the PNaCl
bitcode format so that pointer types don't need to be represented
here.
Change the reader to restore the pointer types so that the intrinsic
declarations pass the LLVM and PNaCl verifiers.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3671
TEST=intrinsic tests in call-elide.ll
+ intrinsic-pointer-args.ll
+ run small_tests with bitcode v2 enabled
Review URL: https://codereview.chromium.org/23793005
|
|
This is a follow-up to:
https://codereview.chromium.org/22240002/
And requires the Clang changes from:
https://codereview.chromium.org/22294002/
This new intrinsic represents ``asm("":::"~{memory}")`` as well as ``__sync_synchronize()``, and in IR it corresponds to a sequentially-consistent fence surrounded by ``call void asm sideeffect "", "~{memory}"()``.
R=jvoung@chromium.org
TEST= ninja check-all
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475
Review URL: https://codereview.chromium.org/22474008
|
|
This is part of a bigger CL to fix C++11 in PNaCl, to commit in the following order:
- https://codereview.chromium.org/20552002
- https://codereview.chromium.org/20554002
- https://codereview.chromium.org/20560002
- https://codereview.chromium.org/20561002
This should be the last PNaCl ABI change for C11/C+11 atomic support.
Note that Clang already has a builtin for lock-free, but it's partly resolved by Clang's ExprConstant.cpp and CGBuiltin.cpp, whereas what we want is a call that becomes a constant at translation-time. I made the translation part fairly general so it's easy to support architectures where ``true`` isn't always the right answer.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475
TEST= ./scons run_synchronization_cpp11_test --verbose bitcode=1 platform=x86-64
TEST= ninja check-all
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/20554002
|
|
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3525
R=jfb@chromium.org
Review URL: https://codereview.chromium.org/19668004
|
|
Following our discussion in the related bug, prefetch will not be part of our initial stable ABI.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3531
TEST= cd ./pnacl/build/llvm_x86_64; ninja check
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/19771015
|
|
|
|
Conflicts:
docs/LangRef.rst
include/llvm/CodeGen/CallingConvLower.h
include/llvm/IRReader/IRReader.h
include/llvm/Target/TargetMachine.h
lib/CodeGen/CallingConvLower.cpp
lib/IRReader/IRReader.cpp
lib/IRReader/LLVMBuild.txt
lib/IRReader/Makefile
lib/LLVMBuild.txt
lib/Makefile
lib/Support/MemoryBuffer.cpp
lib/Support/Unix/PathV2.inc
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/Mips/CMakeLists.txt
lib/Target/Mips/MipsDelaySlotFiller.cpp
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsInstrInfo.td
lib/Target/Mips/MipsSubtarget.cpp
lib/Target/Mips/MipsSubtarget.h
lib/Target/X86/X86FastISel.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrControl.td
lib/Target/X86/X86InstrFormats.td
lib/Transforms/IPO/ExtractGV.cpp
lib/Transforms/InstCombine/InstCombineCompares.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/CodeGen/X86/fast-isel-divrem.ll
test/MC/ARM/data-in-code.ll
tools/Makefile
tools/llvm-extract/llvm-extract.cpp
tools/llvm-link/CMakeLists.txt
tools/opt/CMakeLists.txt
tools/opt/LLVMBuild.txt
tools/opt/Makefile
tools/opt/opt.cpp
|
|
Add portable support for concurrency in PNaCl's ABI:
- Promote volatile to atomic.
- Promote all memory ordering to sequential consistency.
- Rewrite all atomic operations to frozen NaCl intrinsics for pexe.
- Rewrite atomic intrinsics to LLVM instructions for translation.
This change also adds documentation to the PNaCl language reference, as
well as tests where it makes sense.
A future CL could clean up more of our code which mentions atomics,
volatiles, memory orderings.
Multiple reviewers because this is a big patch:
- eliben: LLVM-fu and ResolvePNaClIntrinsics.
- dschuff: ABI stability.
- mseaborn: ABI stability.
- sehr: Tron-duty (fight for the user's programs to work).
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475
R=dschuff@chromium.org, eliben@chromium.org, sehr@google.com
TEST= (cd ./pnacl/build/llvm_x86_64; ninja check-all) && ./pnacl/test.sh test-x86-32 && ./pnacl/test.sh test-x86-64 && ./pnacl/test.sh test-arm && ./pnacl/test.sh test-x86-32-sbtc && ./pnacl/test.sh test-x86-64-sbtc && ./pnacl/test.sh test-arm-sbtc
Review URL: https://codereview.chromium.org/17777004
|
|
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3524
R=jfb@chromium.org
Review URL: https://codereview.chromium.org/18614013
|
|
On the hardware that we support, they are implemented
by instructions and have consistent behavior for -0.0,
values less than -0.0, infinity, and nan.
We will need to be careful to guarantee the same behavior
for untested hardware.
TEST=run_llvm_math_intrinsics_test
BUG=http://code.google.com/p/nativeclient/issues/detail?id=3378
R=jfb@chromium.org, mseaborn@chromium.org
Review URL: https://codereview.chromium.org/18559005
|
|
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3339
R=mseaborn@chromium.org
Review URL: https://codereview.chromium.org/18426002
|
|
This makes the checker stricter, so that it will reject names such as
"@llvm.memcpy.foo".
Reuse Intrinsic::getName() and Intrinsic::getType() for checking the
exact function name and type that we should expect for whitelisted
intrinsics. This is simpler than writing code to check each argument
type separately.
intrinsics.ll test: Add some tests. Simplify existing tests by
replacing multiple CHECK-NOTs with a single "CHECK-NOT: disallowed",
which is stricter because it is less specific.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3530
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/18302002
|
|
Convert calls to this intrinsic to use the 32-bit variant instead. Do
the same for the memcpy and memmove intrinsics too.
Change the PNaCl ABI verifier to check this argument.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3530
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/18226003
|
|
The stacksave/restore intrinsics are covered by
"run_vla_test", tests in GCC torture testsuite, and
basic llvm lit tests (mostly related to debug info...).
The pow intrinsic is no longer needed after Eli's
change to Clang, and pow is done purely in libm
(even with -fno-math-errno).
BUG=http://code.google.com/p/nativeclient/issues/detail?id=3378
R=eliben@chromium.org, jfb@chromium.org, mseaborn@chromium.org
Review URL: https://codereview.chromium.org/18180002
|
|
Disallow i1 on loads/stores and require the conversions to i8 to be
explicit. Add a pass, PromoteI1Ops, that adds the conversions.
(Load/store on i1 occur in practice in small_tests for some boolean
globals.)
Disallow i1 for most arithmetic/comparison operations since these
aren't very useful and it's a nuisance for a code generator to have to
support these. I haven't seen these occur in practice, but
PromoteI1Ops nevertheless expands them.
We still allow and/or/xor on i1 because these do occur in practice,
and they're less of a nuisance to handle because they never overflow:
no truncation to 1 bit is required, unlike with adds.
Restrict the type of alloca's argument. Clang always uses i32 here.
Disallow i1 in switch instructions. Clang doesn't generate i1
switches for booleans.
Move CopyLoadOrStoreAttrs() helper into a header to reuse.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3490
TEST=PNaCl toolchain trybots + GCC torture tests + Spec2k
Review URL: https://codereview.chromium.org/17356011
|
|
Do the same for memcpy/memmove/memset intrinsic calls that we have
already done for integer loads and stores: Remove assumptions about
pointer alignment by setting the alignment argument to 1. Make the
ABI checker require this.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3445
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17563008
|
|
Simplify the set of "alloca" instructions the ABI verifier allows.
Before this change, we used i8 arrays, such as:
alloca [8 x i8]
After this change, we will just use i8 with an explicit size value, so
that becomes:
alloca i8, i32 8
Allocation of variable-length arrays will require an explicit multiply
instruction. This means that the code generator no longer has to
handle an implicit multiplication in "alloca", reducing the burden on
fast-and-simple code generators a little. This means the PNaCl ABI
doesn't need to specify whether alloca's implicit multiplication
checks for overflow.
This doesn't affect what the backend generates. See
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp, which handles
constant-size AllocaInsts (by filling out StaticAllocaMap) and which
is uses for both -O2 (SelectionDAG) and -O0 (FastISel) translation.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17631004
|
|
Disallow the other input types.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3378
R=jfb@chromium.org
Review URL: https://codereview.chromium.org/17613002
|
|
Change the ABI verifier to require "align 1" on non-atomic integer
accesses to prevent non-portable behaviour. Allow larger alignments
on floating point accesses as a concession to performance, because ARM
might not be able to do unaligned FP loads/stores efficiently.
Change StripAttributes to make pexes pass the ABI verifier.
Also update comments in StripAttributes to match some recent changes.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3445
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17094009
|
|
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3415
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17470005
|
|
Until there is an intrinsic to *set* the rounding mode,
this intrinsic to *get* the rounding mode isn't so useful.
Separately we will add a test that for each platform, the
initial rounding mode is "1" (round to nearest). That is
the case right now for x86, ARM, and MIPS.
(see https://codereview.chromium.org/16785003/)
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3491
R=mseaborn@chromium.org
Review URL: https://codereview.chromium.org/17229007
|
|
Change pnacl-llc.cpp to enable the verifier. This causes two problems
which we fix:
* The ABI check for declared-but-not-defined functions fails in
streaming mode. Fixing this would involve changing the bitcode
reader. For now, disable this check when in streaming mode. Add a
flag to PNaClABIVerifyModule.
* ARM's GlobalMerge pass modifies functions' global variable
references to use ConstantExprs that the ABI checker rejects.
Address this by disabling GlobalMerge for now.
GlobalMerge does not provide much benefit at the moment anyway,
because, with the FlattenGlobals pass applied, GlobalMerge doesn't
merge variables with alignment >1.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3465
TEST=PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17190002
|
|
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3495
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/16903003
|
|
"define available_externally void @foo()" would mean that the
definition of foo() can be dropped from the pexe, because a definition
of foo() can be found in an external native library. This is not
something we support for a PNaCl pexe.
Clang generates "available_externally" for non-static inline function
definitions at -O1, but not at -O0, and generally not at -O2 either
because inlining removes the "available_externally" definition.
"available_externally" gets removed at bitcode link time, so we can
disallow it in the ABI checker without any further work required.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3495
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17035015
|
|
This simplifies the ABI by reducing the number of linkage types we
have to check for and represent in the wire format.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3495
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/17084003
|
|
Do this stripping in the StripAttributes pass. Change the pass to be
a ModulePass so that it can modify global variables.
Change the ABI verifier to check this.
Also update a comment about "nuw" and "nsw".
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3415
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/16991002
|
|
The backend currently treats llvm.expect as a nop
pass-through. Until it becomes more useful, we don't need
it in stable bitcode. It sounds like the backend may
prefer to use the !prof metadata instead.
The -lower-expect pass will convert it into branch
weights, which can be consumed by the middle end optimizer's
block placement pass.
It is already converted to !prof metadata when clang
is run with -O2, but not when clang is run at -O0.
Also move the llvm.frameaddress from the dev part of
the intrinsics test to the disallowed part of the test.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3378
R=mseaborn@chromium.org
Review URL: https://codereview.chromium.org/16882002
|
|
Initially whitelisted to satisfy tests/toolchain/llvm_math_intrinsics.c,
which tests the intrinsics directly. Those tests now skip
ABI verification so they will continue to pass.
Outside of those direct uses, they are not used.
llvm.powi gets introduced during the llvm sandboxed build.
Clang CGBuiltin.cpp has a way to introduce Intrinsic::pow
and Intrinsic::powi. It does not introduce any of the other
intrinsics.
We can add them back later and supply something in compiler_rt
when clang or some transformation actually introduces them.
For now that is not the case.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3378
TEST= scons, llvm nightly, gcc torture, spec2k, naclports
R=eliben@chromium.org
Review URL: https://codereview.chromium.org/16794006
|
|
"nsw" and "nuw" -- "no signed wrap" and "no unsigned wrap" -- are not
used by the backend, which is not surprising because it makes no
difference to the hardware if arithmetic overflows.
Although "exact" is used by the backend to convert "sdiv exact" to an
"ashr" shift, it appears that "sdiv exact" does not get used in
practice, and arguably such a transformation belongs in the user
toolchain, not the PNaCl translator.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3483
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/16746005
|
|
Always use the standard C calling conventions. Disallow "fastcc" etc.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2346
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/16529004
|
|
Add a pass, StripAttributes, for doing this, and enable it.
Add an ABI check to reject these attributes.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2346
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3415
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/16325025
|
|
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3339
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/16270007
|
|
It doesn't appear to be possible to set the address space on a
Function, but we can still put the check in checkGlobalValueCommon()
in case this changes in the future.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=*.ll tests
Review URL: https://codereview.chromium.org/15993019
|
|
Move most of the per-instruction checking in
PNaClABIVerifyFunctions::runOnFunction() to a top-level function so
that it can do an early exit to reject the instruction. Reporting
just a single error per instruction makes the test expectations easier
to understand and update.
Remove the check for metadata types. Metadata won't be part of
PNaCl's stable ABI, so if the metadata-rejecting check is disabled for
debugging purpose, we don't really need to recursively check the
metadata's types.
This lets us remove the recursive checks of Constants and types. We
now only accept a very restricted, non-recursive set of Constants
inside functions and global variable initialisers. This means
PNaClABITypeChecker doesn't need to be stateful any more, and its
methods can become static.
This change also fixes a hole where the operands of "switch"
instructions weren't fully checked.
Add a test to replace-ptrs-with-ints.ll to ensure that "undef" doesn't
appear directly in loads and stores.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=PNaCl toolchain trybots + GCC torture tests + LLVM test suite
Review URL: https://codereview.chromium.org/15780014
|
|
Uses of these are removed by ExpandMulWithOverflow and ExpandStructRegs.
This change was previously committed but reverted because it broke a
varargs function call in 255.vortex in Spec2k. This has since been
fixed by changing ExpandVarArgs.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=PNaCl toolchain trybots + all the Spec2k tests this time around
Review URL: https://codereview.chromium.org/16336012
|
|
This reverts commit 99c2f236a1a09b6c550e91b71dabbbb0e634ea37.
It broken 255.vortex. See https://codereview.chromium.org/16257002/
TBR= mseaborn@chromium.org, jvoung@chromium.org
Review URL: https://codereview.chromium.org/15888014
|
|
behavior.
Fixes rdar:14036816, PR16130.
There is an opportunity to compute precise trip counts for 'or'
expressions and multi-exit loops.
rdar:14038809: Optimize trip count computation for multi-exit loops.
To do this we need to record the fact that ExitLimit assumes NSW. When
it does not we can safely assume that the loop trip count is the
minimum ExitLimt across all subexpressions and loop exits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183060 91177308-0d34-0410-b5e6-96231b3b80d8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@183066 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Check for the normal form produced by FlattenGlobals.
We also require that all GlobalVariables have initialisers. External
globals are not allowed.
Note that we don't need to call TC.isValidType() on GlobalVariables
any more: the new check is stricter.
Update types.ll:
* Split some checks into separate files for clarity. Otherwise the
ordering of aliases/functions/globals/metadata gets tricky.
* Convert a lot of the type-whitelisting tests to test via phi nodes
rather than via global variables, since most of these types are now
rejected for global variables.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3113
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/15914017
|
|
These markers work in a similar way to llvm.lifetime.start/end, so we
should remove them for similar reasons: it's not very well defined how
one marker cancels out the effects of the other.
Arguably, invariant.start/end are less useful than lifetime.start/end.
They are ignored by the backend. They are generated in fewer places:
invariant.start is generated by Clang (at -O1 or higher) when a const
global is initialised with a non-POD initialiser. invariant.end is
apparently not generated at all.
Do the stripping in ReplacePtrsWithInts for consistency with the
existing lifetime.start/end stripping.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3443
TEST=PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/15995004
|
|
Uses of these are removed by ExpandMulWithOverflow and ExpandStructRegs.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/15995005
|
|
conditions.
Fixes PR16130 - clang produces incorrect code with loop/expression at -O2.
This is a 2+ year old bug that's now holding up the release. It's a
case where we knowingly made aggressive assumptions about undefined
behavior. These assumptions are wrong when SCEV is computing a
subexpression that does not directly control the branch. With this
fix, we avoid making assumptions in those cases but still optimize the
common case. SCEV's trip count computation for exits controlled by
'or' expressions is now analagous to the trip count computation for
loops with multiple exits. I had already fixed the multiple exit case
to be conservative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182989 91177308-0d34-0410-b5e6-96231b3b80d8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@183013 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Run StripDeadPrototypes as a final pass to ensure that the prototypes
for lifetime.start/end are removed.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3443
TEST=PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/16063005
|
|
This is a reapply of dc58e24a with one cleanup of a commented-out line in PromoteIntegers.cpp
R=mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360
Review URL: https://codereview.chromium.org/16015003
|
|
We can simplify the varargs checks by doing the checking on the
FunctionType rather than having separate checks for the Function and
the CallInst. (We couldn't do that prior to enabling
ReplacePtrsWithInts because at that point the IR contained bitcasts to
and from varargs FunctionTypes.)
That simplification means we can also add the check for
argument/return types in a single place too.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3342
TEST=*.ll tests + PNaCl toolchain trybots + GCC torture tests + LLVM test suite
Review URL: https://codereview.chromium.org/15899011
|
|
This reverts commit dc58e24a36836fc19c534bdcbef5152717a3c3fc.
That change broke the build of the sandboxed PNaCl translator.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3360
TEST=PNaCl toolchain trybots
TBR=dschuff@chromium.org
Review URL: https://codereview.chromium.org/15845009
|
|
R=mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360
Review URL: https://codereview.chromium.org/15950006
|
|
Change the PNaCl ABI checker to disallow these intrinsics.
Note that I had originally intended to commit this before my earlier
change (https://codereview.chromium.org/15688011) that enables the
ExpandArithWithOverflow pass. Enabling ExpandArithWithOverflow
without changing InstCombine causes ExpandArithWithOverflow to fail on
some of the *.with.overflow intrinsic calls that InstCombine
introduces. This change therefore fixes some breakage.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3434
TEST=PNaCl toolchain trybots + GCC torture tests + LLVM test suite
Review URL: https://codereview.chromium.org/16042011
|
|
Reject module-level assembly and inline assembly within functions.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2345
TEST=*.ll tests + trybots + GCC torture tests
Review URL: https://codereview.chromium.org/16123005
|
|
Disallow i1, i8, which don't make sense for "byte" swapping.
None of these generate outcalls to compiler_rt.
Test coverage:
* test/CodeGen/AArch64/dp1.ll (only testing i32, i64)
* test/CodeGen/ARM/rev.ll (only testing i16)
* test/CodeGen/Mips/bswap.ll (only testing i32, i64)
* test/CodeGen/X86/bswap.ll (i16, i32, i64, on i686)
* test/NaCl/{ARM,X86}/intrinsics-bitmanip.ll (i16, i32, i64)
(maybe the last set of tests could be merged into the
upstream tests)
For targets without native i16 bswap, the i16 could just be
a bswap on an i32 plus a shift right 16.
Other test coverage:
* gcc/testsuite/gcc.dg/builtin-bswap-[1,2,3,4,5].c
Misc: style cleanups, and add comments to the undocumented intrinsics in the dev list.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3378
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/14914011
|
|
BUG=None
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/14840018
|