Maybe help it out?

XR R0,R0
LRVH    R0,INTEL_HALFWORD

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of McKown, John
Sent: Wednesday, June 18, 2008 10:08 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: LRVH instruction - misnamed or BAD?

> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Greg Price
> Sent: Wednesday, June 18, 2008 9:03 AM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: LRVH instruction - misnamed or BAD?
> 
> LRVH - Load Reversed (Halfword)
> 
> So it should load a reversed halfward, right?
> 
> Well, sure, it swaps the byte order (compared to their order 
> in storage)
> and puts them in register bits 48->63, **BUT** it leaves bits 0->47
> UNCHANGED.
> 
> Now, that last part is not what LH does, is it?
> 
> In my book, that's an INSERT, not a LOAD.  I think it should have
> zeroed bits just like LH does.  I think the LOAD (as I envisage it)
> function is more useful than the INSERT function (as it is 
> implemented).
> 
> Am I right or am I right?  (They are the only possibilities, 
> aren't they?)
> 
> Cheers,
> Greg

I agree. I guess to really make this do what I would generally want, I'd
need to do something like:

        LRVH    R0,INTEL_HALFWORD
        SLL     R0,16
        SRA     R0,16

That would propagate the sign bit correctly. That's for only using the
32 bit register. For using 64 bit, I'd replace the 16 with 48.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it.  

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


------------------------------------------------------------------------------
NOTICE:  This electronic mail message and any attached files are confidential.  
The information is exclusively for the use of the individual or entity intended 
as the recipient.  If you are not the intended recipient, any use, copying, 
printing, reviewing, retention, disclosure, distribution or forwarding of the 
message or any attached file is not authorized and is strictly prohibited.  If 
you have received this electronic mail message in error, please advise the 
sender by reply electronic mail immediately and permanently delete the original 
transmission, any attachments and any copies of this message from your computer 
system. Thank you.

==============================================================================

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to