I have been looking more into how CPU's work, and have a question.
If I have a instruction that e.g. takes a 64bit address and a register, and copies the value from that address into the register. And that instruction has a 2 byte opcode. Then let's say the entire instruction is 80 bits in size.(8 bytes)
Then how would it execute that instruction? Since I presume it doesn't fit in the instruction register(because the register is 64 bits).
Does it just take the opcode and fetch the address(and later it's value) and register later? Or does it have multiple registers? Or does it have one mega big instruction register to fit it all?
Being a 64-bit architecture does not mean there is a single 64-bit instruction register where everything must fit. X86_64 instructions can be up to 15 bytes in length. Each opcode is decoded for execution. In your example, there would be an opcode for moving data that needs another opcode byte to know what to do, and then it knows that 64-bit immediate address follows that must be read and which register will be the target.
X86 supports variable length instructions, so the "instruction register" isn't very simple or limited to 64 bits. The CPU has a rather complex parser that determines the length of the instructions and can extract multiple sequential instructions at the same time.