CPSC 355 Lecture Notes - Lecture 6: Operand, Gnu Compiler Collection, Octal

69 views4 pages

Document Summary

Cpsc 355 - lecture 6 - sept 23rd. An immediate value (a constant) may be used as final source operand or some instructions: eg: add, a # symbol can prefix the immediate, but is optional when using gcc x19, x20, 42 (immediate) Eg: add x19, x20, #42: the allowable range of constants depends on the particular instruction. Depends on the number of available bits within the machine instruction: immediates are assumed to be decimal numbers unless prefixed as follows: Eg: 0b101: some instructions are aliases for other instructions. Is an alias for: add x29, sp, 0. Are provided for readability and programmer convenience: some commonly-used instructions are: Form: mov wd, #imm32: wd: destination register, #imm32: integer in range -231 to +232 -1. Form: mov xd, #imm64: xd: destination register, #imm64: integer range -263 to +264 -1. Form: mov wd, wm: wm: source register, alias for: orr wd, wzr, wm.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents