Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to read unified register number? #22

Closed
mkhairy opened this issue Jun 29, 2020 · 2 comments
Closed

How to read unified register number? #22

mkhairy opened this issue Jun 29, 2020 · 2 comments

Comments

@mkhairy
Copy link

mkhairy commented Jun 29, 2020

Hello,

When I took a look at the operand_t union, I do not see a struct for the unified register number. I see "struct reg", but I think this used for vector register. Is it also used for a unified register number?

   union {
        struct {
            uint64_t value;
        } imm_uint64;

        struct {
            double value;
        } imm_double;

        struct {
            int num;
            /* register properties .XXX */
            char prop[MAX_CHARS];
        } reg;

        struct {
            int num;
        } pred;

        struct {
            int id;
            bool has_imm_offset;
            int imm_offset;
            bool has_reg_offset;
            int reg_offset;
        } cbank;

        struct {
            bool has_ra;
            int ra_num;
            regModifierType ra_mod;
            bool has_ur;
            int ur_num;
            bool has_imm;
            int imm;
        } mref;

        struct {
            char array[MAX_CHARS];
        } generic;

    } u;
} operand_t;
@x-y-z
Copy link
Collaborator

x-y-z commented Jun 29, 2020

Yes. When operandType is REG, operand_t.u.reg.num is vector register number. When operandType is UREG, it means unified register number.

@mkhairy
Copy link
Author

mkhairy commented Jun 29, 2020

Ok, I got it. Thanks!

@mkhairy mkhairy closed this as completed Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants