Displaying 7 results from an estimated 7 matches for "rot_bit".
Did you mean:
rot_bits
2012 Jul 31
0
[LLVMdev] [llvm-commits] rotate
On Tue, Jul 31, 2012 at 8:42 AM, Cameron McInally
<cameron.mcinally at nyu.edu> wrote:
> Andy,
>
> Here is the left circular shift operator patch. I apologize to the reviewer
> in advance. The patch has a good bit of fine detail. Any
> comments/criticisms?
>
> Some caveats...
>
> 1) This is just the bare minimum needed to make the left circular shift
> operator
2012 Jul 29
3
[LLVMdev] rotate
...PM, Michael Gottesman wrote:
> I can get clang/llvm to emit a rotate instruction on x86-64 when compiling C by just using -Os and the rotate from Hacker's Delight i.e.,
>
> ======
> #include<stdlib.h>
> #include<stdint.h>
>
> uint32_t ror(uint32_t input, size_t rot_bits)
> {
> return (input>> rot_bits) | (input<< ((sizeof(input)<< 3) - rot_bits));
> }
> ======
>
> Then compile with (assuming you are on OS X):
> ======
> ISYSROOT=$(xcodebuild -sdk macosx -version PlatformPath)/Developer/SDKs/MacOSX10.8.sdk
> $(xcr...
2012 Jul 29
0
[LLVMdev] rotate
I can get clang/llvm to emit a rotate instruction on x86-64 when compiling C by just using -Os and the rotate from Hacker's Delight i.e.,
======
#include <stdlib.h>
#include <stdint.h>
uint32_t ror(uint32_t input, size_t rot_bits)
{
return (input >> rot_bits) | (input << ((sizeof(input) << 3) - rot_bits));
}
======
Then compile with (assuming you are on OS X):
======
ISYSROOT=$(xcodebuild -sdk macosx -version PlatformPath)/Developer/SDKs/MacOSX10.8.sdk
$(xcrun -find clang) -isysroot $ISYSROOT ror.c -c...
2012 Jul 29
2
[LLVMdev] rotate
in C or C++, how can I get clang/llvm to try and do a "rotate".
(want to test this code in the mips16 port)
i.e. emit rotr node.
tia.
reed
2012 Jul 29
3
[LLVMdev] rotate
...this is from
memory!). It would be nice to have a __builtin_rotl family in clang, in
my opinion, but it would need back-end support from llvm. I would expect
it to find use in code relating to hashing and cryptology. I know that
the compiler *should* optimise
uint32_t ror(uint32_t input, size_t rot_bits) {
return (input >> rot_bits) | (input << ((sizeof(input) << 3) - rot_bits));
}
and such macros / inline functions are common, but an intrinsic specifies
intent better and could provide for better code optimisation.
Would this be worthwhile pursuing?
Cheers
Andy
2012 Jul 29
0
[LLVMdev] rotate
...>> I can get clang/llvm to emit a rotate instruction on x86-64 when compiling C by just using -Os and the rotate from Hacker's Delight i.e.,
>>
>> ======
>> #include<stdlib.h>
>> #include<stdint.h>
>>
>> uint32_t ror(uint32_t input, size_t rot_bits)
>> {
>> return (input>> rot_bits) | (input<< ((sizeof(input)<< 3) - rot_bits));
>> }
>> ======
>>
>> Then compile with (assuming you are on OS X):
>> ======
>> ISYSROOT=$(xcodebuild -sdk macosx -version PlatformPath)/Develope...
2012 Jul 31
3
[LLVMdev] rotate
Andy,
Here is the left circular shift operator patch. I apologize to the reviewer
in advance. The patch has a good bit of fine detail. Any
comments/criticisms?
Some caveats...
1) This is just the bare minimum needed to make the left circular shift
operator work (e.g. no instruction combining).
2) I tried my best to select operator names in the existing style; please
feel free to change them as