Transcription of Lecture 5: MIPS Examples
{{id}} {{{paragraph}}}
1 Lecture 5: MIPS Examples Today s topics: the compilation process full example sort in C Reminder: 2ndassignment will be posted later today2 Dealing with Characters Instructions are also provided to deal with byte-sizedand half-word quantities: lb (load-byte), sb, lh, sh These data types are most useful when dealing withcharacters, pixel values, etc. C employs ASCII formats to represent characters eachcharacter is represented with 8 bits and a string ends inthe null character (corresponding to the 8-bit number 0)3 ExampleConvert to assembly:void strcpy (char x[], char y[]){int i;i=0;while ((x[i] = y[i]) != `\0 )i += 1;}4 ExampleConvert to assembly:void strcpy (char x[], char y[]){int i;i=0;while ((x[i] = y[i]) !)}
• RISC instructions are more amenable to high performance (clock speed and parallelism) – modern Intel processors convert IA-32 instructions into simpler micro-operations. 19 Title
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}