6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Sep 28, 2024 9:23 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Aug 26, 2022 7:48 pm 
Offline

Joined: Sun Oct 03, 2021 2:17 am
Posts: 114
Does the 65816 use register renaming? Some instructions sound like they would be somewhat easy to implement with register renaming:

  • XBA
  • XCE
  • TXY
  • TYX

Because both registers (or bits, in the case of XCE) being swapped are the same size.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 26, 2022 8:05 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
I would doubt it, although it's possible - the Z80 does this, in several different ways, it relabels things rather than moving data.

Edit: not sure if we could know, short of reverse engineering the chip.


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 27, 2022 5:40 am 
Offline

Joined: Sun Oct 03, 2021 2:17 am
Posts: 114
I looked at viewtopic.php?p=15729

Would this be in transfer switches or register transfer logic?


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 27, 2022 6:16 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
I think the way register renaming needs to work is to have something by way of a register address - even if only one bit - such that the register access is done through a decoder and the decoder's action is modified by the renaming map.

In the very simplest case, that XBA is done as a rename, it means that A and B are accessed - always - through an indirect bit which says which is which.

But a look at instruction timings tells us that the Txx instructions take two cycles, whereas XBA takes three. So XBA is doing more work than a single operation, and so we can, I think, conclude that XBA is actually shuffling A and B contents - it's not renaming the two.

But but but, XCE takes only two cycles, so there is mechanism in there to swap two bits (just two bits!) efficiently, or there is mechanism in there to access those two bits through an indirect which-is-which bit.


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 27, 2022 11:50 am 
Offline

Joined: Thu Mar 12, 2020 10:04 pm
Posts: 702
Location: North Tejas
BigEd wrote:
I would doubt it, although it's possible - the Z80 does this, in several different ways, it relabels things rather than moving data.

I have always liked being able to exchange DE and HL in four cycles and wished that instructions existed for BC <-> HL and BC <-> DE. Reading that page explains why that is not the case.


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 27, 2022 4:10 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
My 1988 KK Computer uses register renaming... even though the term itself was unknown to me at the time.

KK is a 65C02 augmented with 6 new registers and 44 new instructions. Register K0 is the default source for address bits A23-A16, and thus has similarities to PBR and DBR on the 65C816 (also unknown to me at the time).

As the homegrown mnemonics imply, a far jump or far call (JMP_K3 or JSR_K3) uses K3 to specify the new A23-A16.

This is accomplished by an apparent swap of K3 with K0. But, as Ed explained, it isn't actually the register contents that change. Instead, there's an XOR gate that changes the behavior of the decoding mechanism that selects K3 as opposed to K0. :mrgreen:

-- Jeff

Attachment:
KK Register Diagram.png
KK Register Diagram.png [ 8.39 KiB | Viewed 576 times ]

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 guests


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 post attachments in this forum

Search for:
Jump to: