RISC - prohibited instruction sequences












2














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 executed.



RISC:Implementation artifacts exposed to machine-level
programs. Some RISC machines prohibit particular
instruction sequences and have jumps that do
not take effect until the following instruction is executed.
The compiler is given the task of optimizing
performance within these constraints.



And im wondering what "particular instruction sequences" is prohibited, and why?










share|improve this question



























    2














    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 executed.



    RISC:Implementation artifacts exposed to machine-level
    programs. Some RISC machines prohibit particular
    instruction sequences and have jumps that do
    not take effect until the following instruction is executed.
    The compiler is given the task of optimizing
    performance within these constraints.



    And im wondering what "particular instruction sequences" is prohibited, and why?










    share|improve this question

























      2












      2








      2







      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 executed.



      RISC:Implementation artifacts exposed to machine-level
      programs. Some RISC machines prohibit particular
      instruction sequences and have jumps that do
      not take effect until the following instruction is executed.
      The compiler is given the task of optimizing
      performance within these constraints.



      And im wondering what "particular instruction sequences" is prohibited, and why?










      share|improve this question













      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 executed.



      RISC:Implementation artifacts exposed to machine-level
      programs. Some RISC machines prohibit particular
      instruction sequences and have jumps that do
      not take effect until the following instruction is executed.
      The compiler is given the task of optimizing
      performance within these constraints.



      And im wondering what "particular instruction sequences" is prohibited, and why?







      risc






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 1 '18 at 11:30









      kkpokerkkpoker

      112




      112
























          1 Answer
          1






          active

          oldest

          votes


















          1














          What the author is trying to convey is that CISC ISAs are better at hiding micro-architecture details from the programmer than RISC. A CISC ISA exposes instructions that denote a specific operation that is not necessarily tied to the way a micro-architecture implementation might execute that operation.



          Let's say we want want to move data from memory position A to another B -- A CISC architecture would expose that operation as an instruction similar to this: "mov B, A" (macro-op). Now, one way one can implement this at the micro-architecture level is to do it in two steps, i.e. execute two instructions (micro-ops) -- Load data from A to a register and then store from that register into memory position B. Another way to do this is to offload the moving of data to a co-processor that might be more efficient at moving the data around in memory (DMA engine). Either way, the programmer encodes the operation as a single instruction (the "mov" instruction) without requiring knowledge of how the operation will actually be executed at the micro-architecture level



          On the other hand, RISC ISAs tend to (although not always) expose operations as they actually execute in the processor (i.e. in the form of micro-ops) and it's the job of the programmer to compose those operation into more complex ones that do what the programmer wants the program to do. The move operation described above as an example would have to be explicitly encoded as two instructions or using DMA.



          The example the author gives as RISC ISAs exposing implementation details ("artifacts"), is about branch delay slots where the instruction following a branch will always be executed independently if the branch is taken or not. This is due to the pipelining of instructions which is a micro-architecture technique used to speed up execution. In this case, the ISA is exposing a micro-architecture detail that the programmer needs to be aware of to guarantee program correctness. Pipelining instructions can also create other pipeline hazzards which is what I think the author means as "prohibited instruction sequences". These instruction sequences are no prohibited per se, you can execute them but they will produce incorrect results.



          Hope this helps.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53100413%2frisc-prohibited-instruction-sequences%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            What the author is trying to convey is that CISC ISAs are better at hiding micro-architecture details from the programmer than RISC. A CISC ISA exposes instructions that denote a specific operation that is not necessarily tied to the way a micro-architecture implementation might execute that operation.



            Let's say we want want to move data from memory position A to another B -- A CISC architecture would expose that operation as an instruction similar to this: "mov B, A" (macro-op). Now, one way one can implement this at the micro-architecture level is to do it in two steps, i.e. execute two instructions (micro-ops) -- Load data from A to a register and then store from that register into memory position B. Another way to do this is to offload the moving of data to a co-processor that might be more efficient at moving the data around in memory (DMA engine). Either way, the programmer encodes the operation as a single instruction (the "mov" instruction) without requiring knowledge of how the operation will actually be executed at the micro-architecture level



            On the other hand, RISC ISAs tend to (although not always) expose operations as they actually execute in the processor (i.e. in the form of micro-ops) and it's the job of the programmer to compose those operation into more complex ones that do what the programmer wants the program to do. The move operation described above as an example would have to be explicitly encoded as two instructions or using DMA.



            The example the author gives as RISC ISAs exposing implementation details ("artifacts"), is about branch delay slots where the instruction following a branch will always be executed independently if the branch is taken or not. This is due to the pipelining of instructions which is a micro-architecture technique used to speed up execution. In this case, the ISA is exposing a micro-architecture detail that the programmer needs to be aware of to guarantee program correctness. Pipelining instructions can also create other pipeline hazzards which is what I think the author means as "prohibited instruction sequences". These instruction sequences are no prohibited per se, you can execute them but they will produce incorrect results.



            Hope this helps.






            share|improve this answer




























              1














              What the author is trying to convey is that CISC ISAs are better at hiding micro-architecture details from the programmer than RISC. A CISC ISA exposes instructions that denote a specific operation that is not necessarily tied to the way a micro-architecture implementation might execute that operation.



              Let's say we want want to move data from memory position A to another B -- A CISC architecture would expose that operation as an instruction similar to this: "mov B, A" (macro-op). Now, one way one can implement this at the micro-architecture level is to do it in two steps, i.e. execute two instructions (micro-ops) -- Load data from A to a register and then store from that register into memory position B. Another way to do this is to offload the moving of data to a co-processor that might be more efficient at moving the data around in memory (DMA engine). Either way, the programmer encodes the operation as a single instruction (the "mov" instruction) without requiring knowledge of how the operation will actually be executed at the micro-architecture level



              On the other hand, RISC ISAs tend to (although not always) expose operations as they actually execute in the processor (i.e. in the form of micro-ops) and it's the job of the programmer to compose those operation into more complex ones that do what the programmer wants the program to do. The move operation described above as an example would have to be explicitly encoded as two instructions or using DMA.



              The example the author gives as RISC ISAs exposing implementation details ("artifacts"), is about branch delay slots where the instruction following a branch will always be executed independently if the branch is taken or not. This is due to the pipelining of instructions which is a micro-architecture technique used to speed up execution. In this case, the ISA is exposing a micro-architecture detail that the programmer needs to be aware of to guarantee program correctness. Pipelining instructions can also create other pipeline hazzards which is what I think the author means as "prohibited instruction sequences". These instruction sequences are no prohibited per se, you can execute them but they will produce incorrect results.



              Hope this helps.






              share|improve this answer


























                1












                1








                1






                What the author is trying to convey is that CISC ISAs are better at hiding micro-architecture details from the programmer than RISC. A CISC ISA exposes instructions that denote a specific operation that is not necessarily tied to the way a micro-architecture implementation might execute that operation.



                Let's say we want want to move data from memory position A to another B -- A CISC architecture would expose that operation as an instruction similar to this: "mov B, A" (macro-op). Now, one way one can implement this at the micro-architecture level is to do it in two steps, i.e. execute two instructions (micro-ops) -- Load data from A to a register and then store from that register into memory position B. Another way to do this is to offload the moving of data to a co-processor that might be more efficient at moving the data around in memory (DMA engine). Either way, the programmer encodes the operation as a single instruction (the "mov" instruction) without requiring knowledge of how the operation will actually be executed at the micro-architecture level



                On the other hand, RISC ISAs tend to (although not always) expose operations as they actually execute in the processor (i.e. in the form of micro-ops) and it's the job of the programmer to compose those operation into more complex ones that do what the programmer wants the program to do. The move operation described above as an example would have to be explicitly encoded as two instructions or using DMA.



                The example the author gives as RISC ISAs exposing implementation details ("artifacts"), is about branch delay slots where the instruction following a branch will always be executed independently if the branch is taken or not. This is due to the pipelining of instructions which is a micro-architecture technique used to speed up execution. In this case, the ISA is exposing a micro-architecture detail that the programmer needs to be aware of to guarantee program correctness. Pipelining instructions can also create other pipeline hazzards which is what I think the author means as "prohibited instruction sequences". These instruction sequences are no prohibited per se, you can execute them but they will produce incorrect results.



                Hope this helps.






                share|improve this answer














                What the author is trying to convey is that CISC ISAs are better at hiding micro-architecture details from the programmer than RISC. A CISC ISA exposes instructions that denote a specific operation that is not necessarily tied to the way a micro-architecture implementation might execute that operation.



                Let's say we want want to move data from memory position A to another B -- A CISC architecture would expose that operation as an instruction similar to this: "mov B, A" (macro-op). Now, one way one can implement this at the micro-architecture level is to do it in two steps, i.e. execute two instructions (micro-ops) -- Load data from A to a register and then store from that register into memory position B. Another way to do this is to offload the moving of data to a co-processor that might be more efficient at moving the data around in memory (DMA engine). Either way, the programmer encodes the operation as a single instruction (the "mov" instruction) without requiring knowledge of how the operation will actually be executed at the micro-architecture level



                On the other hand, RISC ISAs tend to (although not always) expose operations as they actually execute in the processor (i.e. in the form of micro-ops) and it's the job of the programmer to compose those operation into more complex ones that do what the programmer wants the program to do. The move operation described above as an example would have to be explicitly encoded as two instructions or using DMA.



                The example the author gives as RISC ISAs exposing implementation details ("artifacts"), is about branch delay slots where the instruction following a branch will always be executed independently if the branch is taken or not. This is due to the pipelining of instructions which is a micro-architecture technique used to speed up execution. In this case, the ISA is exposing a micro-architecture detail that the programmer needs to be aware of to guarantee program correctness. Pipelining instructions can also create other pipeline hazzards which is what I think the author means as "prohibited instruction sequences". These instruction sequences are no prohibited per se, you can execute them but they will produce incorrect results.



                Hope this helps.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 21 '18 at 16:20

























                answered Nov 21 '18 at 16:03









                rdarda

                764




                764






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53100413%2frisc-prohibited-instruction-sequences%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Wiesbaden

                    Marschland

                    Dieringhausen