Re: Curious compiler optimization

2021-11-27 Thread Mario Bezzi
Correcting myself, sorry. On 11/27/21 11:44 AM, Mario Bezzi wrote: the code between #APP and #NO_APP is the same for the two runs. The code between #APP and #NO_APP is *not* the same, still the call is there. I.e. gcc attempted an optimization of the passed asm code. Thank you, mario On

Re: Curious compiler optimization

2021-11-27 Thread Mario Bezzi
Tested under linux x86_64. _asm call sample blindly taken from https://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 int asmFunct() {  int from, to;  asm (" movl %0,%%eax; \n"   " movl %1,%%ecx; \n"   " call _foo 

Re: Curious compiler optimization

2021-11-24 Thread Mario Bezzi
Peter thanks for all your help on this. I agree with Seymour's statement below, and I consider the inability to see dependencies that may exist as a compiler limitation. For this reason, waiting for a long term formal solution, rather than asking users to go through massive rework of their co

Re: Curious compiler optimization

2021-11-23 Thread Mario Bezzi
Peter, thank you for your interest and help. Below my attempt to answer to your questions. I hope this helps, mario On 11/23/21 2:19 PM, Peter Relson wrote: Mario, Did you ever try yours but returning the value in functRC (an output from the __asm) rather than 0, just to bound the problem? Y

Re: Curious compiler optimization

2021-11-22 Thread Mario Bezzi
rles -Original Message- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Mario Bezzi Sent: Monday, November 22, 2021 9:37 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Curious compiler optimization Apparently not.. int cGlue(void *functParms

Re: Curious compiler optimization

2021-11-22 Thread Mario Bezzi
Apparently not.. int cGlue(void *functParms) {  int cFuction(void *);  int functRC = cFunction(functParms);  return 0; } SOURCE,XREF,SSCOMM,LIST,LANGLVL(EXTENDED),LONGNAME,ASM,RENT,OPT(3) 000D8    End of Prolog 02 | * 00

Re: Curious compiler optimization

2021-11-21 Thread Mario Bezzi
knows the function return code must be calculated. regards, Tom Date:    Fri, 19 Nov 2021 08:33:20 -0500 From:    Mario Bezzi Subject: Re: Curious compiler optimization Resending as the original, nicely formatted post, was rejected because HTML. Just for sharing.. The following simple C fun

Re: Curious compiler optimization

2021-11-20 Thread Mario Bezzi
Gil thank you, but I would not consider a "BALR 14,15" otiose. In general I would expect the optimizer to let alone explicitly handcrafted assembler code it doesn't understand. mario On 11/20/21 5:19 PM, Paul Gilmartin wrote: On Nov 20, 2021, at 08:45:38, Phil Smith III wrot

Re: Curious compiler optimization

2021-11-19 Thread Mario Bezzi
Resending as the original, nicely formatted post, was rejected because HTML. Just for sharing.. The following simple C function: int asmFunct(void *asmFunctPtr, void *asmFunctParms) { int functRC;

Re: Curious compiler optimization

2021-11-13 Thread Mario Bezzi
On 11/12/21 3:04 PM, Peter Relson wrote: I'd think that if you want decent code, you don't ask for no optimization. I have the following C function with embedded ASM: int asmFunct(void *asmEntryPoint, void *functParms) {  int functRC;  __asm( " L    15,%1  \n"    " LR   1,%2 

Re: What's wrong with me?

2021-05-30 Thread Mario Bezzi
Thank you all for your kind help. I will try to get an svc dump and see what the SDWA says. I'll keep you posted. mario On 5/30/21 3:36 PM, Peter Relson wrote: Are you able to get a dump that would have the SDWA in it (or record the error in logrec so you can view it)? RTM presents two sets o

Re: What's wrong with me?

2021-05-29 Thread Mario Bezzi
Jonathan, thank you for bringing into play the linkage stack, good point, and congratulations for recognizing IXGCONN from just few instructions. amazing! I will follow the execution within IXGL1RTE and see if I can make sense of this. Still I don't understand the PER interrupt code while it

What's wrong with me?

2021-05-28 Thread Mario Bezzi
Hello, I have a Language Environment enabled program which seldomly fails with a program check. The Machine State section of the LE DUMP shows PSW and REGS at time of error.  Machine State  MCH_EYE:ZMCH  GPR00:0007    GPR01:0003A970  GPR02:2F63612C    GPR03:00094D62  GPR04:2F62A248    GP

Re: A modest proposal: LE enabled HLASM + C runtime

2017-11-15 Thread Mario Bezzi
I started using METAL C and love it. Calling METALC from C is very easy. Just my own taste. mario On 11/15/2017 04:58 PM, Gord Tomlin wrote: On 2017-11-15 09:58, John McKown wrote: This idea came to me the other night. And may be explained by the slight fever induced by my flu vacination. As