8

I used inline C in perl to write inline assembly.

I deserve death.

Comments
  • 4
    ** using compiler intrinsics instead does not make the act any less sinful, pardon denied.
  • 5
    Oh look an actual rant between all the spam :D
  • 3
    But at least it works, right?
  • 6
    Not at all, you deserve a prize.
  • 3
    what are you building..?
  • 6
    If its x86, then the only place it won't run is on a Mac. This is an acceptable loss.
  • 2
    @YourMom

    Hey, this guy looks a bit like a character in my latest novel.
  • 3
    @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?
  • 3
    @Liebranca lOL your inline C is as useless as your career. Even Perl clled it trash and Perl *eats* trash. Stay irrelevant 😂
  • 3
    @retoor that no funni (•Ë‹ _ ËŠ•)
  • 2
    @Liebranca sorry, had PMS.
Add Comment