Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

Scheduled Pinned Locked Moved Uncategorized
49 Posts 32 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • nspace@infosec.exchangeN nspace@infosec.exchange

    @gsuberland @ryanc we have microcode for amd too 😛 and it works on the newest cpus unlike on intel. there are a lot of internal registes you can access only through microcode

    gsuberland@chaos.socialG This user is from outside of this forum
    gsuberland@chaos.socialG This user is from outside of this forum
    gsuberland@chaos.social
    wrote last edited by
    #20

    @nspace @ryanc ah neat. I haven't read through the AMD stuff yet

    1 Reply Last reply
    0
    • ryanc@infosec.exchangeR ryanc@infosec.exchange

      Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

      If you think the answer is 16, by the way, no it is not.

      bitchboss@marcella.masto.hostB This user is from outside of this forum
      bitchboss@marcella.masto.hostB This user is from outside of this forum
      bitchboss@marcella.masto.host
      wrote last edited by
      #21

      @ryanc

      A whole bunch of registers. If you run out of it, You might considder to stop using Macro Assembler and write GWBasic programs...

      RAX, RBX, RCX, RDX, EAX, EBX, ECX, EDX, RDI, RSI, RBP, RSP, EDI, ESI, EBP, ESP, R8-R15, CS, DS, ES, FS, GS, SS, RIP, EIP, RFLAGS, EFLAGS, CR0-CR4, DR0-DR7, MSRs, SIMD, XMM0-XMM15, YMM0-YMM15, ZMM0-ZMM31, MM0--MM7,
      ST0-ST7, MXCSR.

      dascandy@infosec.exchangeD 1 Reply Last reply
      0
      • R relay@relay.publicsquare.global shared this topic
      • ryanc@infosec.exchangeR ryanc@infosec.exchange

        Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

        If you think the answer is 16, by the way, no it is not.

        timwardcam@c.imT This user is from outside of this forum
        timwardcam@c.imT This user is from outside of this forum
        timwardcam@c.im
        wrote last edited by
        #22

        @ryanc Even for a Z80 it's not a trivial answer. (Yes I do know someone who wrote some code that used the R register.)

        lp0_on_fire@social.linux.pizzaL 1 Reply Last reply
        0
        • ryanc@infosec.exchangeR ryanc@infosec.exchange

          Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

          If you think the answer is 16, by the way, no it is not.

          halcy@icosahedron.websiteH This user is from outside of this forum
          halcy@icosahedron.websiteH This user is from outside of this forum
          halcy@icosahedron.website
          wrote last edited by
          #23

          @ryanc oh, that’s easy, actually. The answer is precisely one less than whatever the ideal number for your workload would be.

          1 Reply Last reply
          0
          • ryanc@infosec.exchangeR ryanc@infosec.exchange

            Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

            If you think the answer is 16, by the way, no it is not.

            indigoviolet@tech.lgbtI This user is from outside of this forum
            indigoviolet@tech.lgbtI This user is from outside of this forum
            indigoviolet@tech.lgbt
            wrote last edited by
            #24

            @ryanc (xkcd 2867)

            1 Reply Last reply
            0
            • javierg@mstdn.socialJ javierg@mstdn.social

              @ryanc
              Long ago, I was starting to understand register renaming (the phrase "register file" gave me existencial doubts), and then they came with hyperthreading...
              Now I feel CPU architecture is purely a spectator sport.

              arrjay@tacobelllabs.netA This user is from outside of this forum
              arrjay@tacobelllabs.netA This user is from outside of this forum
              arrjay@tacobelllabs.net
              wrote last edited by
              #25

              @javierg @ryanc register usage is certainly a speculative sport

              1 Reply Last reply
              0
              • ryanc@infosec.exchangeR ryanc@infosec.exchange

                Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

                If you think the answer is 16, by the way, no it is not.

                gunstick@mastodon.opencloud.luG This user is from outside of this forum
                gunstick@mastodon.opencloud.luG This user is from outside of this forum
                gunstick@mastodon.opencloud.lu
                wrote last edited by
                #26

                @ryanc easier question:
                How many registers does the Motorola 68000 have?
                It is also not 16.

                1 Reply Last reply
                0
                • bitchboss@marcella.masto.hostB bitchboss@marcella.masto.host

                  @ryanc

                  A whole bunch of registers. If you run out of it, You might considder to stop using Macro Assembler and write GWBasic programs...

                  RAX, RBX, RCX, RDX, EAX, EBX, ECX, EDX, RDI, RSI, RBP, RSP, EDI, ESI, EBP, ESP, R8-R15, CS, DS, ES, FS, GS, SS, RIP, EIP, RFLAGS, EFLAGS, CR0-CR4, DR0-DR7, MSRs, SIMD, XMM0-XMM15, YMM0-YMM15, ZMM0-ZMM31, MM0--MM7,
                  ST0-ST7, MXCSR.

                  dascandy@infosec.exchangeD This user is from outside of this forum
                  dascandy@infosec.exchangeD This user is from outside of this forum
                  dascandy@infosec.exchange
                  wrote last edited by
                  #27

                  @ryanc @bitchboss you forgot ah, al, ch, cl, dh, dl, bh, bl, dil, sil, spl and bpl. And of course r8l, r8w etc.

                  bitchboss@marcella.masto.hostB 1 Reply Last reply
                  0
                  • hp@mastodon.tmm.cxH This user is from outside of this forum
                    hp@mastodon.tmm.cxH This user is from outside of this forum
                    hp@mastodon.tmm.cx
                    wrote last edited by
                    #28

                    @kaye @ryanc I thought it the most important rule of CPU architectures was to be a PDP-11 and have fun.

                    1 Reply Last reply
                    0
                    • dascandy@infosec.exchangeD dascandy@infosec.exchange

                      @ryanc @bitchboss you forgot ah, al, ch, cl, dh, dl, bh, bl, dil, sil, spl and bpl. And of course r8l, r8w etc.

                      bitchboss@marcella.masto.hostB This user is from outside of this forum
                      bitchboss@marcella.masto.hostB This user is from outside of this forum
                      bitchboss@marcella.masto.host
                      wrote last edited by
                      #29

                      @dascandy @ryanc

                      Damn... Are those 8/16 bitters still in use?

                      gsuberland@chaos.socialG 1 Reply Last reply
                      0
                      • ryanc@infosec.exchangeR ryanc@infosec.exchange

                        Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

                        If you think the answer is 16, by the way, no it is not.

                        keinna@plasmatrap.comK This user is from outside of this forum
                        keinna@plasmatrap.comK This user is from outside of this forum
                        keinna@plasmatrap.com
                        wrote last edited by
                        #30

                        @ryanc@infosec.exchange more than one

                        1 Reply Last reply
                        0
                        • ryanc@infosec.exchangeR ryanc@infosec.exchange

                          Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

                          If you think the answer is 16, by the way, no it is not.

                          dalias@hachyderm.ioD This user is from outside of this forum
                          dalias@hachyderm.ioD This user is from outside of this forum
                          dalias@hachyderm.io
                          wrote last edited by
                          #31

                          @ryanc It depends a lot on what you mean by registers and which execution domain you're talking about.

                          ryanc@infosec.exchangeR 1 Reply Last reply
                          0
                          • nspace@infosec.exchangeN nspace@infosec.exchange

                            @gsuberland @ryanc we have microcode for amd too 😛 and it works on the newest cpus unlike on intel. there are a lot of internal registes you can access only through microcode

                            pixx@merveilles.townP This user is from outside of this forum
                            pixx@merveilles.townP This user is from outside of this forum
                            pixx@merveilles.town
                            wrote last edited by
                            #32

                            @nspace
                            Ooh, links?
                            @gsuberland @ryanc

                            nspace@infosec.exchangeN 1 Reply Last reply
                            0
                            • dalias@hachyderm.ioD dalias@hachyderm.io

                              @ryanc It depends a lot on what you mean by registers and which execution domain you're talking about.

                              ryanc@infosec.exchangeR This user is from outside of this forum
                              ryanc@infosec.exchangeR This user is from outside of this forum
                              ryanc@infosec.exchange
                              wrote last edited by
                              #33

                              @dalias yes

                              1 Reply Last reply
                              0
                              • ryanc@infosec.exchangeR ryanc@infosec.exchange

                                Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

                                If you think the answer is 16, by the way, no it is not.

                                kentenmakto@mastodon.ieK This user is from outside of this forum
                                kentenmakto@mastodon.ieK This user is from outside of this forum
                                kentenmakto@mastodon.ie
                                wrote last edited by
                                #34

                                @ryanc Related: I grew up thinking the 6502 had three registers.

                                Then I saw someone say X and Y weren't registers at all.

                                Then I saw someone else say the first 256 bytes of RAM *were* registers.

                                1 Reply Last reply
                                0
                                • ryanc@infosec.exchangeR ryanc@infosec.exchange

                                  Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

                                  If you think the answer is 16, by the way, no it is not.

                                  stompyrobot@mastodon.gamedev.placeS This user is from outside of this forum
                                  stompyrobot@mastodon.gamedev.placeS This user is from outside of this forum
                                  stompyrobot@mastodon.gamedev.place
                                  wrote last edited by
                                  #35

                                  @ryanc
                                  You *can* talk about "architectural registers" though. But even there, there are a bunch of special purpose registers, so what counts as a "register?"

                                  1 Reply Last reply
                                  0
                                  • ryanc@infosec.exchangeR ryanc@infosec.exchange

                                    Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

                                    If you think the answer is 16, by the way, no it is not.

                                    compod@mastodon.socialC This user is from outside of this forum
                                    compod@mastodon.socialC This user is from outside of this forum
                                    compod@mastodon.social
                                    wrote last edited by
                                    #36

                                    @ryanc having looked into that blog post: complicated. Very complicated. (To quote the Doctor)

                                    1 Reply Last reply
                                    0
                                    • bitchboss@marcella.masto.hostB bitchboss@marcella.masto.host

                                      @dascandy @ryanc

                                      Damn... Are those 8/16 bitters still in use?

                                      gsuberland@chaos.socialG This user is from outside of this forum
                                      gsuberland@chaos.socialG This user is from outside of this forum
                                      gsuberland@chaos.social
                                      wrote last edited by
                                      #37

                                      @bitchboss @dascandy @ryanc yup, you even get them for the extended GPRs in x64

                                      dascandy@infosec.exchangeD 1 Reply Last reply
                                      0
                                      • ryanc@infosec.exchangeR ryanc@infosec.exchange

                                        Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".

                                        If you think the answer is 16, by the way, no it is not.

                                        israajamal@mastodon.socialI This user is from outside of this forum
                                        israajamal@mastodon.socialI This user is from outside of this forum
                                        israajamal@mastodon.social
                                        wrote last edited by
                                        #38

                                        @ryanc please help me and support me 🇵🇸 #freepalestine

                                        1 Reply Last reply
                                        0
                                        • timwardcam@c.imT timwardcam@c.im

                                          @ryanc Even for a Z80 it's not a trivial answer. (Yes I do know someone who wrote some code that used the R register.)

                                          lp0_on_fire@social.linux.pizzaL This user is from outside of this forum
                                          lp0_on_fire@social.linux.pizzaL This user is from outside of this forum
                                          lp0_on_fire@social.linux.pizza
                                          wrote last edited by
                                          #39

                                          @TimWardCam @ryanc, let's see… from what I remember:

                                          8-bit registers (treatable as 16-bit pairs): A, F, B, C, D, E, H, L.
                                          16-bit registers (treatable as 8-bit halves): IX, IY.
                                          8-bit registers: I, R.
                                          16-bit registers: AF', BC', DE', HL', SP, PC.

                                          18 registers in total. I'm specifically not counting different views as distinct registers: AF is counted as A and F, but IXH and IXL are counted as IX.

                                          Yes, some aspects of this are… somewhat arbitrary. I could count BC, DE and HL as three rather than six and it wouldn't be wrong. I could count AF that way too – and it probably does match the other pairs in terms of the actual hardware design (and it could reasonably be called FA as, looking at the opcode patterns, it makes sense for A to be the lower 8 bits).

                                          Now. Have I missed anything…?

                                          timwardcam@c.imT 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups