Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 1,404
    • Issues 1,404
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 67
    • Merge requests 67
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #14862
Closed
Open
Issue created Oct 21, 2009 by FPC Admin account@fpc_adminOwner

Few Intel x64 assembler bugs

Original Reporter info from Mantis: Enigma
  • Reporter name:

Description:

I've noticed few assembler bugs, means bugs that occur when I use some "asm end;"... Everything here is related to Intel assembler type, x64.

  1. Compiler allows to write such code
    asm
    pushad
    end;
    but "pushad" is instruction of x32 assembler, in x64 there is no pushad/pushaq, there is no instructions that allows to push all registers to stack. Compiler generates $60 opcode for this command, but in WinDbg this opcode is known as invalid.
  2. Same as #1 but with "popad"
  3. Compiler allows to do this:
asm<br/>
  pushfd
  popfd

end;
but in x64 assembler there is no such commands too. For x64 there are:

asm<br/>
  pushfq
  popfq

end;
4. Also one bug... If I implement such record:

type<br/>
  TOwnRecord = record
    first_param  : qword;
    second_param : qword;
    third_param  : qword;
  end;

var
param : TOwnRecord;
then in assembler code I do the following:

asm<br/>
  lea rax, [rip + param]
  mov TOwnRecord(rax).first_param, rcx

end;
after compiling, the second line is changing from qword to dword, means, in WinDbg the second line looks:
mov dword ptr [rax + 0], ecx
but not as I require:
mov qword ptr [rax + 0], rcx

Mantis conversion info:

  • Mantis ID: 14862
  • OS: Vista
  • OS Build: x64
  • Platform: Windows
  • Version: 2.5.1
  • Fixed in version: 2.6.0
  • Fixed in revision: 15546 (#9273856e)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking