CS33-6

CS33-6 - SPIM Assembler Memory built on word boundaries All...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-1 SPIM Assembler Memory built on word boundaries All instructions begin on word boundaries Data words require alignment Byte: No restrictions Halfword: Even address Word: Address multiple of 4 DoubleWord:Address multiple of 8
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-2 MIPS Memory Machine Standard Multiple Regions 0x00400000: Text Segment: Program Code 0x10000000: Data Segment: Program Data 0x7FFFFFFC: Stack Segment: Works Down 0x80000000: Kernel Text: Kernel Code 0x90000000: Kernel Data: Kernel Data
Background image of page 2
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-3 SPIM Assembler
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-4 SPIM Assembler Characteristics Built in to SPIM Loads directly into SPIM Does not generate object code Uses syscall’s to access I/O library Does not support all hardware details Implements branch instructions differently from hardware
Background image of page 4
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-5 SPIM Assembler Capabilities Accepts native MIPS machine instructions Provides data-generation pseudo-ops Provides macro instruction for common operations not in the native opcode set Supports labels but labels must be used as a data word label or as a jump or branch destination
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-6 SPIM Assembler Input Format Comments begin with # anywhere on line Machine instructions use mnemonics Pseudo-ops all begin with a period
Background image of page 6
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-7 Machine Instructions Input in source format Label is optional Recognizes register names Examples add $t0,$t1,$t2 here: sra $s5,$t7,10 xori $s3,$a0,1 lw $a0,12($s6)
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-8 Machine Instruction Translation Each field translated separately Instruction word is 32 bits long Fields merged to form binary instruction Final instruction is viewed as hexadecimal Fields not generally visible in hex format
Background image of page 8
CS 33: Computer Organization Topic 6: SPIM Assembler 9/2008 John A. Rohr All Rights Reserved JAR 6-9 Machine Translation Example sub $t2,$t0,$t1 • R d = $t2 Register 10 01010 2 • R s = $t0 Register 8 01000 2 • R t = $t1 Register 9 01001 2 000000 01000
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/20/2009 for the course CS 33 taught by Professor Rohr during the Fall '08 term at UCLA.

Page1 / 37

CS33-6 - SPIM Assembler Memory built on word boundaries All...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online