Differences in MIPS and ARM

I just started learning architecture and I have some confusion between MIPS and ARM architecture.

I learned that MIPS is predominantly in two formats: i and R (J). I read about these presentation formats, rs, rt, opcode and related stuff. I also looked at Patterson's COA book (edition-IV) which focuses on the ARM ISA. The presentation of the instructions in this edition is different. Are these differences due to changing architecture? And the ARM assembly code is slightly different from the book I used with MIPS ISA.

eg. Patterson IV Edition says

LDR r5,[r3,#32]
STR r1,[r4,#48]

      

while another MIPS I read says

lw r5,[r3,#32]
sw r1,[r4,#48]

      

Is the difference due to the ISA they follow, or are they two different versions of the same ISA? Could you also explain the main differences between MIPS and ARM?

+3


source to share


1 answer


Yes lw and sw are loading and saving word for mips. ldr and str are loaded and store the word for the hand. and for x86 you are using mov.

Mips usually has a syntax that uses $ 0-3 $ or the even more nasty $ v0, etc. Arm and many others use r and the number r0-rn (some people try to guess this with alias names too),

ARM and MIPS are competitors, they are not the same company, and they are not the same architectures. Mechanical Engineering MIPS falls into several categories you mentioned, ARM has many reasons for good or bad reason, both are well documented in MIPS or ARM documentation.



So, as for the instruction encoding that is defined by the inventors of the instruction set for whatever reason they choose, good, bad or otherwise, this is what they can do what they want.

Contrary to the syntax of assembly language, the inventor of isa tends to create one to go along with the documentation for the instruction set, and they usually create or hire someone to create the assembly language. But assembler (software that takes assembly language and outputs machine code from it), authors ultimately dictate assembly language syntax, and they don't have to conform to the syntax of isa documentation. And there is no reason for any two separate assemblers to use the same syntax. Over time, for example, hexadecimal numbers have had a dollar sign of $ 12 or a trailing h 12h, but now you often see C syntax supported or preferred by 0x12. Sometimes you see an indirect plus offset as 12 (r3) or [r3, # 12] or describe the same thing.

+1


source







All Articles