Computer Science 281
Fifth Exercise Set
Purpose
Due: Friday, March 5
/* Test program to decode a floating point number */ .global fsgn fsgn: save %sp, -96, %sp (some code: return (in %o0) the sign of the fp number ret restore .global fexp fexp: save %sp, -96, %sp (some code: return the exponent (an integer) ret restore .global ffract ffract: save %sp, -96, %sp (some code: return the unnormalized fraction (an integer, to be printed out in hex) ret restore .global trunc trunc: save %sp, -96, %sp (some code: return the truncated value of the fp number (i.e., integer part only))
to be called by the program scanfmain.c in the directory ~matthews/cs281