Difference: ProjectHome (23 vs. 24)

Revision 242008-02-12 - XiaomingGu

Line: 1 to 1
 
META TOPICPARENT name="CS255Spring08"
Line: 49 to 49
 Deadline: 11:59pm Feb 11, 2008.
Changed:
<
<

Part 2: Artificial Transformation (10%)

>
>

Part 2: Weird Control Flow (10%)

 
  • Reverse all printf, scanf, and __builtin_puts statements in a basic block. If there are k such statements in a basic block, the first statement will be switched with the last statement, the second statement will be switched with the (k-1)th statement, and so on. At a function call such as scanf and printf, Gcc copies the arguments to a temporary variable. For the project, you need to move these copy statements with the call.
  • If the statement is a conditional branch in the form of if cond goto L1; else goto L2, interchange the two branches to if cond goto L2; else goto L1. Alternatively, you can change it to if (not cond) goto L1; else goto L2.
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback