You are viewing a single thread.
View all comments View context
0 points
  1. The whole article overall lacks sources.
  2. That section is completely unsourced.
  3. It doesn’t say what you think it says.

You were arguing the definition of “X-bit CPU”. We’re not talking about “X-bit ALU”. It’s also not up to contention that “A 64-bit integer is 64 bit wide”. So, to the statement:

Also, 64-bit central processing units (CPU) and arithmetic logic units (ALU) are those that are based on processor registers, address buses, or data buses of that size.

This does not say which of “processor register, address buses, or data buses” applies to CPU and which to ALU.

Obviously 64 bits means registers are 64 bit, the addresses are therefore also 64 bit,

Having 64 bit registers doesn’t necessitate that you have 64 bit addresses. It’s common, incredibly common, for the integer registers to match the pointer width but there’s no hard requirement in theory or practice. It’s about as arbitrary a rule as “Instruction length must be wider than the register size”, so that immediate constants fit into the instruction stream, makes sense doesn’t it… and then along come RISC architectures and split load immediate instructions into two.

otherwise it would require type casting every time you need to make calculations on them

Processors don’t typecast. Please stop talking.

permalink
report
parent
reply
1 point
*

Processors don’t typecast. Please stop talking.

Which is why it’s such a pain, because you have to do it manually:
https://lemire.me/blog/2021/10/21/converting-binary-floating-point-numbers-to-integers/

permalink
report
parent
reply
0 points
*

I’m sorry are we somehow assuming floating-point pointers, now, of course you need to convert there. “casting” is a specific thing you do in C which may or may not involve conversion of actual data. Processors don’t speak C. Processors don’t have a type system.

You can use 32-bit pointers in x86_64 long mode, no issue. You don’t even need to bit-fiddle: mov rax, [esi] is perfectly legal. Opcode 0x67488B06. Dereferencing rsi would be 0x488B06.

permalink
report
parent
reply
1 point
*

I’m sorry are we somehow assuming floating-point pointers, now, of course you need to convert there.

“floating-point pointers” is not a thing:

“casting” is a specific thing you do in C

No it’s not:
https://en.wikipedia.org/wiki/Type_conversion

In computer science, type conversion,[1][2] type casting,[1][3] type coercion,[3] and type juggling[4][5] are different ways of changing an expression from one data type to another.

You don’t even have a clue, you are just talking trash.

In assembly you don’t generally talk about pointers, but address modes. Like register, immediate or memory (indirect).

Have you ever actually been programming any serious assembly? Because you sure don’t sound like it.

permalink
report
parent
reply
1 point
*
Deleted by creator
permalink
report
parent
reply

Technology

!technology@lemmy.world

Create post

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


Community stats

  • 12K

    Monthly active users

  • 13K

    Posts

  • 577K

    Comments