Hello,
It appears we need a sample source to reproduce and investigate the issue you are experiencing compiling a Metal C program with ARCH(9).
The compiler uses branch relative instruction and inserts the macro IEABRCX DEFINE to enable branch relative in the macros inserted via __asm in the source. Keep in mind having at least one __asm statement in the source is a requirement for the DEFINE statement to appear.
As an example, here is my sample source, compile command, and the header of the generated assembler output which shows the IEABRCX DEFINE statement. I have used the latest PTF of z/OS XL C/C++ V2R1, UI26897.z2r1.
Thanks,
Visda
int asm_foo(void);
/* return 20 */
int asm_foo(void) {
int a , b;
a = 8;
b = 12;
__asm(" AR %0,%1 "
: "=r"(a)
: "r"(b), "0"(a)
);
return a;
}
int main() {
int ret = 0;
ret = ret + asm_foo();
return ret;
}
xlc -qMETAL -S myprog.c
head myprog.s
TITLE '5650ZOS V2.1 z/OS XL C X 000000
./myprog.c' 000000
ACONTROL AFPR 000000
MYPROG CSECT 000000
MYPROG AMODE 31 000000
MYPROG RMODE ANY 000000
SYSSTATE ARCHLVL=2 000000
IEABRCX DEFINE 000000
* int asm_foo(void); 000001
Visda