Skip to content

INTERNAL ASSEMBLER : Does not know about Internal assembler error: line 4: unhandled mnemonic: RDRAND [RDRAND RAX] #218

Description

@Schmitty2005

Working on a simple random number generator, I ran across this issue.

procedure GetHardwareRandom64 {: UInt64}; {$IFDEF BLAISE}assembler; nostackframe;{$ENDIF}
{var
  Value: UInt64;
  Success: Byte;}
{$asmmode intel}  //FPC Defaults to AT&T asm syntax
{$IFNDEF BLAISE}
begin{$ENDIF}
  asm
    RDRAND RAX
    SETC   AL
    MOV    Success, AL
    MOV    RandSeed64, RAX //Value, RAX
  end;
      asm
      RDTSC     //<<Blaise internal assembler does not know this either
      SHL RDX, 32
      OR  RDX, RAX
      MOV Value, RDX
    end;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions