instruction-set

Why can an executable run on both Intel and AMD processors?

丶灬走出姿态 提交于 2020-08-18 05:15:33
问题 How is it that an executable can work on both AMD and Intel systems. Aren't AMD's and Intel's instruction sets different? How does the executable work on both? How exactly do they compile the files to work like that. And what exactly is the role of the OS in all this? 回答1: Essentially these days, compilation is done for the OS not for hardware, as most hardware have universal protocols and/or tech, as mentioned above, x86 or x64 machine code/opcodes/instruction sets, some programmers do make

Why can an executable run on both Intel and AMD processors?

余生颓废 提交于 2020-08-18 05:14:18
问题 How is it that an executable can work on both AMD and Intel systems. Aren't AMD's and Intel's instruction sets different? How does the executable work on both? How exactly do they compile the files to work like that. And what exactly is the role of the OS in all this? 回答1: Essentially these days, compilation is done for the OS not for hardware, as most hardware have universal protocols and/or tech, as mentioned above, x86 or x64 machine code/opcodes/instruction sets, some programmers do make

What is the point of SSE2 instructions such as orpd?

橙三吉。 提交于 2020-07-30 06:04:50
问题 The orpd instruction is a "bitwise logical OR of packed double precision floating point values". Doesn't this do exactly the same thing as por ("bitwise logical OR")? If so, what's the point of having it? 回答1: Remember that SSE1 orps came first. (Well actually MMX por mm, mm/mem came even before SSE1.) Having the same opcode with a new prefix be the SSE2 orpd instruction makes sense for hardware decoder logic, I guess, just like movapd vs. movaps . Several instructions like this are redundant

What is the point of SSE2 instructions such as orpd?

我只是一个虾纸丫 提交于 2020-07-30 06:04:04
问题 The orpd instruction is a "bitwise logical OR of packed double precision floating point values". Doesn't this do exactly the same thing as por ("bitwise logical OR")? If so, what's the point of having it? 回答1: Remember that SSE1 orps came first. (Well actually MMX por mm, mm/mem came even before SSE1.) Having the same opcode with a new prefix be the SSE2 orpd instruction makes sense for hardware decoder logic, I guess, just like movapd vs. movaps . Several instructions like this are redundant

why we can't move a 64-bit immediate value to memory?

泪湿孤枕 提交于 2020-07-09 05:15:53
问题 First I am a little bit confused with the differences between movq and movabsq , my text book says: The regular movq instruction can only have immediate source operands that can be represented as 32-bit two’s-complement numbers. This value is then sign extended to produce the 64-bit value for the destination. The movabsq instruction can have an arbitrary 64-bit immediate value as its source operand and can only have a register as a destination. I have two questions to this. Question 1 The

why we can't move a 64-bit immediate value to memory?

跟風遠走 提交于 2020-07-09 05:14:31
问题 First I am a little bit confused with the differences between movq and movabsq , my text book says: The regular movq instruction can only have immediate source operands that can be represented as 32-bit two’s-complement numbers. This value is then sign extended to produce the 64-bit value for the destination. The movabsq instruction can have an arbitrary 64-bit immediate value as its source operand and can only have a register as a destination. I have two questions to this. Question 1 The

How do IBMs lis and ori instructions work?

限于喜欢 提交于 2020-06-26 13:44:28
问题 I want to know how do lis and ori instructions work? There is a description IBM description which i cannot understand well. Could someone explain to me what is the result on this example: lis r1, 0x0028 ori r1, r1, 0x776F 回答1: lis is defined here ( http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/ssw_aix_53/com.ibm.aix.aixassem/doc/alangref/fixed_point_load.htm#idx175 ) Extended Mnemonic lis rx, value => Equivalent to addis rx, 0, value . aka Load Immediate Shifted addis is

What is the difference between Instruction Set and Instruction Set Architecture (ISA)?

与世无争的帅哥 提交于 2020-01-25 22:09:18
问题 I am not able to understand the difference between Instruction set and Instruction set architecture. I know what is an instruction set . Instruction set just defines the possible instructions we can give to the processor and how the instruction are give ( therefore the instruction format ) to the processor. Now what is Instruction set architecture ? I have looked up wikipedia, it has a page on instruction set and inside it, on the first line there is a link to instruction set architecture

What is the difference between Instruction Set and Instruction Set Architecture (ISA)?

我怕爱的太早我们不能终老 提交于 2020-01-25 22:08:29
问题 I am not able to understand the difference between Instruction set and Instruction set architecture. I know what is an instruction set . Instruction set just defines the possible instructions we can give to the processor and how the instruction are give ( therefore the instruction format ) to the processor. Now what is Instruction set architecture ? I have looked up wikipedia, it has a page on instruction set and inside it, on the first line there is a link to instruction set architecture

Why are RISC-V S-B and U-J instruction types encoded in this way?

核能气质少年 提交于 2020-01-12 18:57:32
问题 I am reading a book "Computer Organization and Design RISC-V Edition" , and I came across the encoding for S-B and U-J instruction types. Those types I have mentioned above has strange encoded immediate field. S-B types separate the immediate field into 2 parts. This makes sense since all instructions encoding has to be similar. But I cannot understand why the immediate field is encoded in this way below. imm[12, 10:5], imm[4:1, 11] instead of imm[11:5], imm[4:0] U-J types also have this