Skip to content

PowerPC: 'Z' inline assembly constraint not supported #49952

@tstellar

Description

@tstellar
Bugzilla Link 50608
Resolution FIXED
Resolved on Jun 15, 2021 15:33
Version trunk
OS Linux
Blocks #48661
CC @nemanjai,@tbaederr
Fixed by commit(s) a9e4f91 f78f530

Extended Description

cat test.c

void func(int myarg)
{
asm volatile(" .asciz "%n[S1]@%I[A1]%[A1]" " :: [S1] "n" (1), [A1] "nZr" ((myarg)));
}

int main(int argc, char **argv)
{
func(0);
return 0;
}

./bin/clang --target=ppc64le test.c

test.c:10:18: error: invalid operand in inline asm: ' .asciz "${0:n}@${1:I}$1" '

If I remove the 'Z constraint the test case compiles successfully. This constraint is supported by gcc: https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions