Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

64 bit or 32 bit Register ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 106
Location: windsor

PostPosted: Thu Jun 18, 2015 2:26 am    Post subject: 64 bit or 32 bit Register ?
Reply with quote

Hi experts,

I am reading the book and it said System Z is 64 bit and have 16 64 bit GPRs . But when i look at the content of GPRs , it only shows something like 3B 9A D9 FE which is 4 byte (32bit) so why not 8 bytes (62 bit) ?

Thanks
Back to top
View user's profile Send private message

steve-myers

Active User


Joined: 30 Nov 2013
Posts: 460
Location: The Universe

PostPosted: Thu Jun 18, 2015 3:44 am    Post subject:
Reply with quote

Jack – This is one of the strangest aspects of z/Architecture.

Like the book says, there are 16 64-bit “general purpose” registers.

Now, when the register is specified with a an old instruction, only the low order 32 bits of the register are used. In other words,

L 0,32(,15)

loads the 32-bits at the location in storage determined by adding 32 to the contents of register 15 into bits 32 through 63 (as it is worded in Principles of Operation) of register 0. Bits 0 to 31 of the register are not altered. Similarly, an instruction like AR 5,0 will only use bits 32 to 63 of the registers; bits 0 to 31 are not altered.

Most of the instructions that use all 64 bits of a register usually have a G in the instruction name. LG 0,32(,15) will load the 64 bits at the storage location determined by adding 32 to the contents of register 15 into register 0.

I've been using the TIMEUSED macro recently. For example -
Code:
         TIMEUSED STORADR=START,CPU=MIC,LINKAGE=SYSTEM
         ... Instructions
         TIMEUSED STORADR=END,CPU=MIC,LINKAGE=SYSTEM
         LG    0,END
         SG    0,START
         CVD   0,DWORK
         ED    EDMASK,DWORK
         ...
START    DC    FD'0'
END      DC    FD'0'
DWORK    DC    PL8'0'
EDMASK   DC    0C' NNNNNNNNN.NNNNNN'
         DC    C' ',7X'20',X'2120',C'.',6X'20'
The LG/SG instructions effectively calculate the number of microseconds required to execute the instructions between the two TIMEUSED macros. The CVD instruction converts the 32 bit value in bits 32 to 63 of register 0 to decimal. By writing the appropriate bytes in EDMASK after executing the ED instruction I can write a nice message like xxxxxxxx USED 2.74 CPU SECONDS.
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 106
Location: windsor

PostPosted: Thu Jun 18, 2015 6:05 pm    Post subject:
Reply with quote

Hi steve,

Thanks for your answer. So like you said, if i use 64 bit insturction like LG

i should see the content of GPGs something like 64 bit
(XX XX XX XX XX XX XX XX )

right ?
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 460
Location: The Universe

PostPosted: Thu Jun 18, 2015 8:03 pm    Post subject:
Reply with quote

Basically, yes, though it is usually formatted as hhhhhhhh_hhhhhhhh. I've never figured out why all 64 bits are formatted and just the low order 32 bits are formatted in places like the summary dump. But it usually seems to get it right!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to display Register values using WTO sudarshan.srivathsav PL/I & Assembler 3 Fri May 02, 2014 11:46 pm
No new posts Doubt in Register storage Arunkumar Chandrasekaran PL/I & Assembler 2 Sat Aug 10, 2013 3:39 am
No new posts RETURN-CODE REGISTER pvnlrao Testing & Performance analysis 2 Tue May 15, 2012 12:11 pm
No new posts Why single base register address to o... sandeep chopra PL/I & Assembler 4 Fri May 06, 2011 8:20 am
No new posts which string verb contains inbuilt ta... pullaiah.cts COBOL Programming 7 Tue Sep 07, 2010 5:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us