본문 바로가기
csapp

3.6.7 Loops

by 정구지개발자 2023. 4. 14.
728x90

Do-While Loops

 

While Loops

  • The first translation method, which we refer to as jump to middle, performs the initial test by performing an unconditional jump to the test at the end of the loop. It can be expressed by the following template for translating from the general while loop form to goto cod
  • The second translation method, which we refer to as guarded do, first trans- forms the code into a do-while loop by using a conditional branch to skip over the loop if the initial test fails. Gcc follows this strategy when compiling with higher levels of optimization,

728x90

'csapp' 카테고리의 다른 글

3.7.1 The Run-Time Stack  (2) 2023.04.18
3.6.8 Switch Statements  (0) 2023.04.14
3.6.5 Implementing Conditional Branches with Conditional Control  (0) 2023.04.13
3.6 Control  (0) 2023.04.10
3.5 Arithmetic and Logical Operations  (0) 2023.04.10

댓글