Home > Archive > Cobol > February 2007 > POINTER alignment
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Roger While 2007-02-17, 3:55 am |
| Yes, I know POINTER alignment is implementor defined however
I would like to know what various Cobol compilers do.
eg.
01 MYREC.
03 FILLER PIC X.
03 MYPTR USAGE POINTER.
MF (per default) does not align so that MYREC is
5/9 bytes depending 32/64 bit.
What do the big-iron boxes do ?
Roger
| |
| Richard Maher 2007-02-17, 7:55 am |
| Hi Roger,
DEC COBOL will do the same (by default). Compiler qualifiers (and even *DC
SET ALIGNMENT compiler directives) can control the behaviour for
performance.
By all reports, an alignment fault on Itanium is extremely expensive so
COBOL goes out of its way to generate the code to stop this from happening.
There is at least one that got through the net (something to do with
INDEXED BY) that is actively being bugfixed now.
Regards Richard Maher
"Roger While" <simrw@sim-basis.de> wrote in message
news:er6cnn$pao$00$1@news.t-online.com...
> Yes, I know POINTER alignment is implementor defined however
> I would like to know what various Cobol compilers do.
> eg.
> 01 MYREC.
> 03 FILLER PIC X.
> 03 MYPTR USAGE POINTER.
>
> MF (per default) does not align so that MYREC is
> 5/9 bytes depending 32/64 bit.
> What do the big-iron boxes do ?
>
> Roger
>
>
| |
| Karl Kiesel 2007-02-19, 3:55 am |
| "Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag
news:er6cnn$pao$00$1@news.t-online.com...
> Yes, I know POINTER alignment is implementor defined however
> I would like to know what various Cobol compilers do.
> eg.
> 01 MYREC.
> 03 FILLER PIC X.
> 03 MYPTR USAGE POINTER.
>
> MF (per default) does not align so that MYREC is
> 5/9 bytes depending 32/64 bit.
> What do the big-iron boxes do ?
>
> Roger
Roger,
Our Compiler COBOL2000 aligns pointers to full words (390 architecture);
thus the structure MYREC will be 8 bytes long (because 01 levels are always
aligned to double word); more on alignment details of other USAGEs can be
found in our language manual using the index 'SYNCHRONIZED' and/or 'slack
bytes'
Karl Kiesel
Fujitsu Siemens Computers, München
| |
| Frank Swarbrick 2007-02-20, 6:55 pm |
| On COBOL for VSE/ESA MYREC is 5 bytes (1 + 4).
[color=darkred]
Yes, I know POINTER alignment is implementor defined however
I would like to know what various Cobol compilers do.
eg.
01 MYREC.
03 FILLER PIC X.
03 MYPTR USAGE POINTER.
MF (per default) does not align so that MYREC is
5/9 bytes depending 32/64 bit.
What do the big-iron boxes do ?
Roger
| |
| Binyamin Dissen 2007-02-21, 7:55 am |
| On Mon, 19 Feb 2007 08:30:36 +0100 "Karl Kiesel"
<Karl.Kiesel@fujitsu-siemens.com> wrote:
:>"Roger While" <simrw@sim-basis.de> schrieb im Newsbeitrag
:>news:er6cnn$pao$00$1@news.t-online.com...
:>> Yes, I know POINTER alignment is implementor defined however
:>> I would like to know what various Cobol compilers do.
:>> eg.
:>> 01 MYREC.
:>> 03 FILLER PIC X.
:>> 03 MYPTR USAGE POINTER.
:>> MF (per default) does not align so that MYREC is
:>> 5/9 bytes depending 32/64 bit.
:>> What do the big-iron boxes do ?
:>Our Compiler COBOL2000 aligns pointers to full words (390 architecture);
Even if SYNC is NOT specified?
:>thus the structure MYREC will be 8 bytes long (because 01 levels are always
:>aligned to double word); more on alignment details of other USAGEs can be
:>found in our language manual using the index 'SYNCHRONIZED' and/or 'slack
:>bytes'
--
Binyamin Dissen <bdissen@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
| |
| Karl Kiesel 2007-02-21, 7:55 am |
|
"Binyamin Dissen" <postingid@dissensoftware.com> schrieb im Newsbeitrag
> :>Our Compiler COBOL2000 aligns pointers to full words (390 architecture);
>
> Even if SYNC is NOT specified?
>
Yes! Specification of SYNC is not necessary, and the compiler even disallows
it in connection with USAGE POINTER (the same applies to PROGRAM-POINTER and
OBJECT REFERENCE)
Karl Kiesel
Fujitsu Siemens Computers
|
|
|
|
|