Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
** using compiler intrinsics instead does not make the act any less sinful, pardon denied.
-
YourMom3071dIf its x86, then the only place it won't run is on a Mac. This is an acceptable loss.
-
Liebranca106217h@AceDev I ask myself the same question ;>
Short version is I wanted to use RDTSC and ROR in a subroutine but couldn't do it at the high level, and so here we are. It's actually fairly straightforward if you use intrinsics, something like:
```perl
use Inline C => q[
· · #include <x86intrin.h>
· · long prng() {
· · · · long out=__rdtsc();
· · · · long rem=out;
· · · · for(int i=0;i < 8;++i) {
· · · · · · rem=__rorq(rem,8);
· · · · · · out^=rem;
· · · · };
· · · · return out;
· · };
];
```
Mmh, actually, I may rewrite it like that for clarity lmao. It compiles to the same thing anyway.
@retoor uuh yes I want the dynamite maker NFT they give to war criminals, what's it called? the nobel peace something something? -
retoor15217h@Liebranca lOL your inline C is as useless as your career. Even Perl clled it trash and Perl *eats* trash. Stay irrelevant 😂
I used inline C in perl to write inline assembly.
I deserve death.
rant