ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 2933

PPC help

by Justtestingit - 01-13-2019 - 03:10 AM
#11
(01-13-2019 - 05:25 PM)Justtestingit Wrote:
(01-13-2019 - 09:21 AM)pdb Wrote: If your 32 bit value is 0x80000000 or greater, the result will be 0xFFFFFFFF00000000 + original value
If your 32 bit value is 0x7FFFFFFF or less, the result will be the exact same as the original value
Thanks for your reply, here is more info about it 

 the value of r3 in this case can be anything from 0 - 17 (i think) and the first instruction using r3 is the "extsw r3, r3" which im unsure about what it does then further down the result in r3 is then cmpwi cr6, r3, 0 then a beq instruction which i understand what cmpwi does just not extsw

If the value doesn't have its high order bit 31 set, then the result is just the same. it's basically converting it from a 32 bit value to a 64 bit value, whilst keeping the negative state
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Multi
Reply
#12
(01-13-2019 - 09:58 PM)MaxModz Wrote:
(01-13-2019 - 05:19 AM)DewRific Wrote:
(01-13-2019 - 03:10 AM)Justtestingit Wrote: can anyone explain to me what extsw does i am learning PowerPC and i have an instruction "extsw r3, r3" ive looked on IBM website but it is sometimes hard to understand the website id really appreciate it if anyone can provide any help in general on PPC or on this particular instruction.

Thanks in advance :)

this might help  https://community.wemod.com/t/powerpc-be...orial/2039

Thank You, I don't have any use for ppc right now but if i do ill definitely look at this.
we have millions of uses for power pc.... lol talk about it on discord ;)
Reply
#13
The contents of the low-order 32 bits of general purpose register (GPR) RS are placed into the low-order 32 bits of GPR RA. Bit 32 of GPR RS is used to fill the high-order 32 bits of GPR RA.
Other registers altered:
Condition Register (CR0 field):
Affected: LT, GT, EQ, SO (if Rc = 1)
XER:
Affected: CA

Feel free to contact me
Reply
#14
(01-14-2019 - 06:51 AM)pdb Wrote:
(01-13-2019 - 05:25 PM)Justtestingit Wrote:
(01-13-2019 - 09:21 AM)pdb Wrote: If your 32 bit value is 0x80000000 or greater, the result will be 0xFFFFFFFF00000000 + original value
If your 32 bit value is 0x7FFFFFFF or less, the result will be the exact same as the original value
Thanks for your reply, here is more info about it 

 the value of r3 in this case can be anything from 0 - 17 (i think) and the first instruction using r3 is the "extsw r3, r3" which im unsure about what it does then further down the result in r3 is then cmpwi cr6, r3, 0 then a beq instruction which i understand what cmpwi does just not extsw

If the value doesn't have its high order bit 31 set, then the result is just the same. it's basically converting it from a 32 bit value to a 64 bit value, whilst keeping the negative state

ok thanks very much i thought it was doing something like that but wasnt 100% sure thanks bro

(01-14-2019 - 11:25 AM)GuruRefunds Wrote: The contents of the low-order 32 bits of general purpose register (GPR) RS are placed into the low-order 32 bits of GPR RA. Bit 32 of GPR RS is used to fill the high-order 32 bits of GPR RA.
Other registers altered:
Condition Register (CR0 field):
Affected: LT, GT, EQ, SO (if Rc = 1)
XER:
Affected: CA

Feel free to contact me

thanks for the reply, i understand now thanks alot for your help
Reply
#15
(01-14-2019 - 04:20 PM)Justtestingit Wrote:
(01-14-2019 - 06:51 AM)pdb Wrote:
(01-13-2019 - 05:25 PM)Justtestingit Wrote:
(01-13-2019 - 09:21 AM)pdb Wrote: If your 32 bit value is 0x80000000 or greater, the result will be 0xFFFFFFFF00000000 + original value
If your 32 bit value is 0x7FFFFFFF or less, the result will be the exact same as the original value
Thanks for your reply, here is more info about it 

 the value of r3 in this case can be anything from 0 - 17 (i think) and the first instruction using r3 is the "extsw r3, r3" which im unsure about what it does then further down the result in r3 is then cmpwi cr6, r3, 0 then a beq instruction which i understand what cmpwi does just not extsw

If the value doesn't have its high order bit 31 set, then the result is just the same. it's basically converting it from a 32 bit value to a 64 bit value, whilst keeping the negative state

ok thanks very much i thought it was doing something like that but wasnt 100% sure thanks bro

(01-14-2019 - 11:25 AM)GuruRefunds Wrote: The contents of the low-order 32 bits of general purpose register (GPR) RS are placed into the low-order 32 bits of GPR RA. Bit 32 of GPR RS is used to fill the high-order 32 bits of GPR RA.
Other registers altered:
Condition Register (CR0 field):
Affected: LT, GT, EQ, SO (if Rc = 1)
XER:
Affected: CA

Feel free to contact me

thanks for the reply, i understand now thanks alot for your help

You are most welcome
Reply
#16
(01-14-2019 - 07:11 AM)XBLxPhantom Wrote: we have millions of uses for power pc.... lol talk about it on discord ;)

Bet.
#CelestialFTW

Reply
#17
(01-13-2019 - 03:10 AM)Justtestingit Wrote: can anyone explain to me what extsw does i am learning PowerPC and i have an instruction "extsw r3, r3" ive looked on IBM website but it is sometimes hard to understand the website id really appreciate it if anyone can provide any help in general on PPC or on this particular instruction.

Thanks in advance :)

hey, this might be too late or someone has answered it, but in short the assembly tool "extsw" just copies the 32bits of one register into another and sign extend the word into a 64bit doublesize word. hope this helps.
Reply

Users browsing: 1 Guest(s)