Jump table for the swi statement is given below. You can asume that th first entry in the jump table is for the case when y-0. Ox Sa0: Oxf70 Ox5as: Oxf6b movq srdi, rax cmpq $7, Brsi Oxf6r 160: f63: long fun (long x, long y)i long result - 0; switch (y) ja jmpq *0x5a0 (, ersi, 8) addq $20, srax 167: f69: E6b: retq decq srax retq leaq (, Srax,8), Srcx subq trax, rcx movq srcx, rax andq rsi, irax retq case 170: case 173: Ox5b0: Oxf6t result (74: Ox5b8: Oxf92 break; E8c: OxSc0: Oxt6b f8f: OxSc8: Oxfr6f case result f92: Ox Sd0: Oxf€f break; 195: Ox5d8: 0xf74 case case result break; default: result x: return result; Consider the above C code and the x86- 64 assembly code that implements the branches of the switch statement of C code. Fill in the blank portions of the C code above to reproduce the function corresponding to the given assembly code. The jump table is also given.
Jump table for the swi statement is given below. You can asume that th first entry in the jump table is for the case when y-0. Ox Sa0: Oxf70 Ox5as: Oxf6b movq srdi, rax cmpq $7, Brsi Oxf6r 160: f63: long fun (long x, long y)i long result - 0; switch (y) ja jmpq *0x5a0 (, ersi, 8) addq $20, srax 167: f69: E6b: retq decq srax retq leaq (, Srax,8), Srcx subq trax, rcx movq srcx, rax andq rsi, irax retq case 170: case 173: Ox5b0: Oxf6t result (74: Ox5b8: Oxf92 break; E8c: OxSc0: Oxt6b f8f: OxSc8: Oxfr6f case result f92: Ox Sd0: Oxf€f break; 195: Ox5d8: 0xf74 case case result break; default: result x: return result; Consider the above C code and the x86- 64 assembly code that implements the branches of the switch statement of C code. Fill in the blank portions of the C code above to reproduce the function corresponding to the given assembly code. The jump table is also given.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education