MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UPT Assembler instruction

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
asr2
Beginner


Joined: 25 Jun 2011
Posts: 26
Topics: 4
Location: Germany

PostPosted: Tue May 08, 2012 3:13 am    Post subject: UPT Assembler instruction Reply with quote

The Update Tree instruction is probably the least understood z/Architecture instruction, not helped by the confusing description in the PoPs, in particular in the case of processing to be performed for equal codewords.

To empirically investigate the behaviour, I wrote a very simple program with a tree containing 2 and 3, elements respectively; each tree element has the same codeword. In both cases, UPT returns 8 as index - why? According to the instruction flowchart in the PoPs, the tree should be processed from the leaf towards the root: why then is 16 (decimal) not returned as index in the 3-element case?
When the codewords are unequal, UPT executes as expected.


Keys: 100000, 100001, 100002
CFC-generated codeword: 00020E0F

Tree with 2 elements
Before UPT
+TREE 00020E0F1EE00B60 00020E0F1EE00B66 0000000000000000
+R0 00020E0F
+R1 1EE00B66
+R5 00000010

After UPT
+CC 00 (=equal codeword)
+R5 00000008 << OK
+TREE 00020E0F1EE00B60 00020E0F1EE00B66 0000000000000000
+R0 00020E0F
+R1 1EE00B66
+R2 00020E0F
+R3 1EE00B60

3 elements
Before UPT
+TREE 00020E0F1EE00B60 00020E0F1EE00B66 00020E0F1EE00B6C
+R0 00020E0F
+R1 1EE00B6C
+R5 00000018

After UPT
+CC 00
+R5 00000008 << why not hex 10?
+TREE 00020E0F1EE00B60 00020E0F1EE00B66 00020E0F1EE00B6C
+R0 00020E0F
+R1 1EE00B6C
+R2 00020E0F
+R3 1EE00B60
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group