Skip to content

[x64][win] Bad codegen with -import-call-optimization #149714

@SEt-t

Description

@SEt-t

I was excited to see new optimization option for library calls, but currently (21.1.0-rc1) it produces broken code:
https://godbolt.org/z/TazjTxfdz

It does generate REX-CALL and NOP, but

  1. CALL type is wrong (relative instead of indirect).
  2. NOP is slightly different to the one generated by MSVC: 0F 1F 44 00 08 instead of 0F 1F 44 00 00. Not sure if this is important to system loader or not.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions