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 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
add a comment |
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
add a comment |
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
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
risc
asked Nov 1 '18 at 11:30
kkpokerkkpoker
112
112
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
edited Nov 21 '18 at 16:20
answered Nov 21 '18 at 16:03
rdarda
764
764
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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