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.
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.
Great! Now please explain how opcodes are expressions. Also, what processor instruction a cast from one pointer type to another pointer type corresponds to.
You are way out of your depth here. Have you even implemented a compiler.
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/
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. Opcode0x67488B06
. Dereferencingrsi
would be0x488B06
.“floating-point pointers” is not a thing:
No it’s not:
https://en.wikipedia.org/wiki/Type_conversion
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.
Great! Now please explain how opcodes are expressions. Also, what processor instruction a cast from one pointer type to another pointer type corresponds to.
You are way out of your depth here. Have you even implemented a compiler.