0

I do not think there is a hazard, but wanted to confirm.

I know that if there was a load word then I should assume a hazard, but is it the same for a store word?

sw $t4,8($t0)
add $t3,$t4,$t0
Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
DJSQUARE
  • 1
  • 1
  • `sw` doesn't write any registers, so no, there's no hazard. – Peter Cordes Jun 03 '18 at 04:00
  • @IRTFM - I think [cpu-architecture] is a good tag for questions about microarchitectural hazards. ([computer-architecture] is a synonym of it. I should probably update the tag usage to include the general computer-architecture side, not just questions about specific real-world micro-architectures like Skylake.) OTOH, having a [cpu-hazard] tag will maybe help auto-complete and reduce mis-tagged questions. We could make it a synonym of [cpu-architecture], or I guess just leave it since we do have several Q&As specifically about hazards and stalling, which don't need many other tags. – Peter Cordes Jun 14 '21 at 15:41
  • @PeterCordes: Thanks for that. My area is in survival analysis and I was creating it to "defend" that use of the [hazard] tag, but I didn't think myself qualified to do a proper write-up in the tag description. I only added it to the questions that were clearly about microcode issues and simply deleted it in questions where it was being used in a very general way to describe "sources of programming errors". – IRTFM Jun 14 '21 at 15:44
  • @IRTFM: Yup, that sounds reasonable. (But note that micro*code* is different from micro-architecture. The modern usage of "microcode" doesn't include how simple CPUs like early MIPS use an instruction's machine-code bits directly as internal control signals. microcode is when an instruction runs via multiple internal steps, e.g. making the CPU run microcode from an internal ROM, instead of running that instruction directly. I'll fix the tag-usage of [cpu-hazard] sometime soon.) – Peter Cordes Jun 14 '21 at 15:53
  • @PeterCordes Feel free to edit my efforts. – IRTFM Jun 14 '21 at 15:54
  • @IRTFM: Re: questions like [Atomicity of IF and the following statement](https://stackoverflow.com/q/40945383) - note that "hazard pointer" is a technical term with a specific meaning. https://en.wikipedia.org/wiki/Hazard_pointer. I don't think SO has a tag for that, though. (And "hazard pointer" is a unique enough phrase to be searchable without a tag.) – Peter Cordes Jun 14 '21 at 15:57
  • @IRTFM: Ok, in case you're curious, https://stackoverflow.com/tags/cpu-hazard/info is now a good summary, IMO of course :) – Peter Cordes Jun 14 '21 at 16:31
  • Thanks. BTW, your SO image is one of my favorite XKCD cartoons. I think I'll go track down some of your [linux] tagged items and see if I can learn something more about my most recent OS choice. (I started out with CP/M.) – IRTFM Jun 14 '21 at 19:40

1 Answers1

1

No registers are affected in store word .You are just taking the value from a register and storing it in a memory location .Hence no hazard