Re: Best way to multiply doublewords?

2011-04-04 Thread Martin Trübner
Owen, I assume we are talking current HW (z-Series) MSG multiply single grande LG R1,TODTIME_END LG R2,TODTIME_START SRG R1,R2 SRLG R1,R1,12 get rid of lower bits MSG R1,=FD'10' times 10 -- Martin Pi_cap_CPU - all you ever need around MWLC/SCRT/CMT in z/VSE more at

Re: Best way to multiply doublewords?

2011-04-04 Thread John McKown
On a z, use the entire 64 bit register and use the MSGx instruction. STCK DOUBLEWORD LG R6,DOUBLEWORD LR7,MULIPLIER MSGR R6,R7 * RESULT OF 64 BIT R6 TIMES 32 BIT R7 IN 64-BIT R6. On Mon, 2011-04-04 at 06:31 -0400, Joe Owens wrote: I have need to multiply a

Re: Best way to multiply doublewords?

2011-04-04 Thread Martin Trübner
John, LR7,MULIPLIER MSGR R6,R7 Would you realy do that? I am sure (and the comment shows that) you ment LR7,MULIPLIER MSGFR R6,R7 or LR7,MULIPLIER LHH R7,=H'0' MSG R6,R7 just to show one variant to clear high order word. ;-)

Re: Best way to multiply doublewords?

2011-04-04 Thread Binyamin Dissen
On Mon, 4 Apr 2011 06:31:49 -0400 Joe Owens joe_ow...@standardlife.com wrote: :I have need to multiply a STCK duration, ie STCK2-STCK1 by a variable :factor, say from 5% to 1000%. OK. :I would like the result to be a STCK duration too, suitable for STIMER :MICVL= Makes sense. :I suspect the

Re: Best way to multiply doublewords?

2011-04-04 Thread Joe Owens
Thanks for the replies, much appreciated. We do have current processors, just my knowledge that is out of date :) The factor might not be a whole number, which is why I thought of FP, but I can see I can follow the multiply by a 64 bit divide by 100 to get a percentage. I take it the 'G'

Re: Best way to multiply doublewords?

2011-04-04 Thread McKown, John
Supervisor assisted linkage saves 64 bit registers. If yours is a main routine and not a subroutine called by other routines, then you likely don't need to worry. If you are worried, you might want to consider using the BAKR instruction because it saves the entire 64 bit registers in the

Re: Best way to multiply doublewords?

2011-04-04 Thread Steve Comstock
On 4/4/2011 6:01 AM, Joe Owens wrote: Thanks for the replies, much appreciated. We do have current processors, just my knowledge that is out of date :) The factor might not be a whole number, which is why I thought of FP, but I can see I can follow the multiply by a 64 bit divide by 100 to get

Re: Best way to multiply doublewords?

2011-04-04 Thread Blaicher, Chris
Working off the standards laid out in the Assembler Services Guide as copied here: Unless otherwise defined by the individual interface, the calling program should expect, upon return, that v The low halves (Bits 32-63) of GPRs 2 through 13 are unchanged v The high halves (Bits 0-31) of GPRs 2

Re: Best way to multiply doublewords?

2011-04-04 Thread Tony Harminc
On 4 April 2011 08:01, Joe Owens joe_ow...@standardlife.com wrote: One question occurs - must I now use extended save areas, as I am doing something to the top halves of the GPRs, or will the system take care of that for me? (There are no amode 64 progs on the calling chain). Perhaps it's

Re: Best way to multiply doublewords?

2011-04-04 Thread Paul Gilmartin
On Apr 4, 2011, at 09:09, Tony Harminc wrote: On 4 April 2011 08:01, Joe Owens joe_ow...@standardlife.com wrote: One question occurs - must I now use extended save areas, as I am doing something to the top halves of the GPRs, or will the system take care of that for me? (There are no amode

Re: Best way to multiply doublewords?

2011-04-04 Thread Tony Harminc
On 4 April 2011 11:23, Paul Gilmartin paulgboul...@aim.com wrote: On Apr 4, 2011, at 09:09, Tony Harminc wrote: On 4 April 2011 08:01, Joe Owens joe_ow...@standardlife.com wrote: One question occurs - must I now use extended save areas, as I am doing something to the top halves of the GPRs,

CPU: ASSM vs ENTERPRISE COBOL

2011-04-04 Thread Angel Luis Domínguez
Hi all, Due to a requirement by my client, I have developped a module in two languages: HL-ASSEMBLER and ENTERPRISE-COBOL-4.2. The module has a lot of mathematic operations and calls a variable number of times to CSF to cipher, but there is NO ACCESS to FILES. It is coded as RENT in two

Re: CPU: ASSM vs ENTERPRISE COBOL

2011-04-04 Thread Sam Siegel
2011/4/4 Angel Luis Domínguez angel_luis_dominguez_mar...@yahoo.es: Unfortunately, the code is copyrighted at this moment by mi client. Probably could bee free in the future, but not now. The post and the question was in a general sense because I was surprised. Thanks a lot anyway. Are

Re: CPU: ASSM vs ENTERPRISE COBOL

2011-04-04 Thread McKown, John
The only thing that occurs to me is that COBOL tends to use the simplier, older instructions. Are you using the more powerful z instructions? An example that I was told about is that MVC in a loop is generally faster than MVCL and both are faster than MVCLE. So, in many case, a simple loop is

Re: ASSM vs ENTERPRISE COBOL

2011-04-04 Thread William M Klein
Long ago (and far away now) when there was a MAJOR rewrite of COBOL for VS COBOL II, IBM spent significant resources in developing a lot of optimization techniques. Some of these would be obvious to Assembler programmers and many were not. Therefore, I can well imagine that COBOL would do some

Re: CPU: ASSM vs ENTERPRISE COBOL

2011-04-04 Thread Hall, Keven
Are both the assembler and COBOL version invoked the same way (i.e., regardless of which version of the program is chosen, are both either statically linked to the main program or are they link-edited as discrete load modules)? Keven Hall | keh...@informatica.com Software Operative Office:

Re: CPU: ASSM vs ENTERPRISE COBOL

2011-04-04 Thread W. Kevin Kelley
Another thing to consider is the number of cache faults the code incurs. In general, you are better off using more instructions if they are register-to-register than a smaller number of instructions that touch storage one or more times. Its not how many instructions an operation takes, its how