Skip to content

[X86-64] 32-bit registers store variables of unsigned char type without zero extension #137764

Open
@zhaojiangkun-1

Description

@zhaojiangkun-1

I found that the 32-bit register stores unsigned char type variables without zero extension in x86.
However, in arm and gcc x86, there are zero extension instructions.
In gcc x86, movzx edi and dil are used.
In ARM, and x8, x0, #0xff are used to implement this function.

Why does x86 not have zero extension instructions? Is this a bug?
The related pass is as follows:
https://godbolt.org/z/qT73j94We

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions