Questions tagged [risc]

DO NOT USE. Use the specific ISA that your question relates to instead, e.g. [arm], [mips], [riscv], [avr] or [instruction-set] for questions about instruction sets in general.

RISC systems are typically load/store in nature, whereby all instructions operate only on registers or immediate values, rather than memory. In order to work against memory the data must be loaded into a register or written from a register using memory specific instructions.

Some well known examples of RISC CPUs are ARM, MIPS, PowerPC, RISC-V and SPARC.

64 questions
11
votes
2 answers

Are PUSH/POP instructions considered RISC or CISC?

I was asked in an interview if PUSH and POP are RISC or CISC instructions. I said that they were RISC, but they told me that they were actually CISC instructions. I suggested that ARM (a common RISC implementation) has these instructions, but they…
user1998844
  • 449
  • 8
  • 18
5
votes
1 answer

Why are there two ways to multiply arbitrary signed numbers in MIPS?

If you need to multiply two arbitrary signed numbers in MIPS, is there a reason to prefer: mul $t0 $s0 $s1 Or this: mult $s0 $s1 mflo $t0 ? I'm finding inconsistent answers online with regard to what each one means. At first glance I would expect…
Adam Smith
  • 449
  • 9
  • 23
3
votes
1 answer

Indexed addressing mode and implied addressing mode

Indexed addressing mode is usually used for accessing arrays as arrays are stored contiguosly. We have a index register which gets incremented in every iteration which when added to base address gives the array element address. I don't understand…
Zephyr
  • 1,521
  • 3
  • 22
  • 42
3
votes
3 answers

RISC under CISC ISA

I am learning about CPU architecture and it is bit confusing. Is it correct that old microprogrammed CISC CPUs would translate ISA instruction into series of simple (1 cycle) microinstructions?(and that by RISC philosophy ISA instruction basically…
2
votes
1 answer

How many clock cycles do the stages of a simple 5 stage processor take?

A 5 stage pipelined CPU has the following sequence of stages: IF – Instruction fetch from instruction memory. RD – Instruction decode and register read. EX – Execute: ALU operation for data and address computation. MA – Data memory access – for…
curiousgeorge
  • 593
  • 1
  • 5
  • 14
2
votes
1 answer

Why this MIPS loop stops printing strings while asking for integers

I'm trying to enter a 4x4 matrix by user input with some nice strings. Something makes one of the strings stop printing at the third iteration, and then the other string stops printing at iteration number 7. I thought it could be a MARS emulator bug…
ecomaikgolf
  • 137
  • 1
  • 9
2
votes
1 answer

assembly program for Fibonacci

I just got a question about the assembly program for Fibonacci sequence. The question is as following : The Fibonacci sequence F is defined as F(1) = F(2) = 1 and for n ≥ 2, F(n + 1) = F(n) + F(n − 1) i.e., the (n + 1)th value is given by the sum of…
2
votes
1 answer

Why the RISC instruction sets usually do not contain register to register copy instruction?

I had this question on my exam and i am confused because as far as i know that move $t0, $a0 # COPY $A0 TO $T0 in MIPS instruction provides that and MIPS is a RISC processor. Am I missing something?
roffensive
  • 564
  • 4
  • 22
2
votes
1 answer

RISC - prohibited instruction sequences

The introduction to computer system book shows a difference between CISC & RISC as the following. CISC: Implementation artifacts hidden from machinelevel programs. The ISA provides a clean abstraction between programs and how they get…
kkpoker
  • 21
  • 2
2
votes
1 answer

Why does this block of assembly code have 2 stalls in pipeline instead of 1?

To elaborate on the main question, why does the third line perform an execution a clock cycle after Register2 has already been written back? I was thinking it should only have 1 stall in the pipeline. But I am incorrect. Is it just some quality with…
Cristian G
  • 47
  • 9
2
votes
2 answers

CISC and RISC architectures

I read a lot about the difference between CISC and RISC architectures from different sources. One of the things that seemed to be agreed upon is that CISC is always used with Von Neumann whereas RISC is used with Harvard architecture. But I couldn't…
YaserM
  • 185
  • 2
  • 9
2
votes
1 answer

Processor performance complex and simple instructions

I have been stuck on a problem in my class for a week now. I was hoping someone could help steer me in the right direction. a busy cat http://www.designedbychristian.com/unnamed.png Processor R IS A 64-BIT RISC processor with a 2GHz clock rate. The…
Christian4423
  • 1,746
  • 2
  • 15
  • 25
2
votes
1 answer

Hand coded assembly - practical register allocation?

I've never written any long programs in assembly. But from my superficial experience it appears not as hard as people make it seem like. The only thing I can't quite wrap my head around is: How does one practically carry out register allocation?…
Michał B.
  • 23
  • 2
2
votes
2 answers

Classic RISC pipeline- what does "memory access" stage actually do?

Referring to the wikipedia article: http://en.wikipedia.org/wiki/Classic_RISC_pipeline I am a little unsure what the "memory access" stage actually does. If "execute" actually does the execution, what purpose is there of retrieving memory addresses…
user997112
  • 29,025
  • 43
  • 182
  • 361
1
vote
2 answers

DMA vs Load/Store Unit

As I understand The LSU(Load/Store Unit) in a RISC architecture like Arm handles load/store calls, and DMA(Direct Memory Access) Unit is responsible for moving data independent from the processor, memory to memory, peripheral to memory, etc. What I…
ALPEREN K
  • 13
  • 3
1
2 3 4 5