Encoding:

POOL32F

010101

ft

fs

0

fm

t

CEIL.W

01101100

POOL32FXf

111011

6

5

5

1

1

8

6

Format:

CEIL.W.fmt 

Floating Point Ceiling Convert to Word Fixed Point

CEIL.W.S   ft, fs

microMIPS

Floating Point Ceiling Convert to Word Fixed Point

CEIL.W.D   ft, fs

microMIPS

Floating Point Ceiling Convert to Word Fixed Point

Purpose:

Floating Point Ceiling Convert to Word Fixed Point

To convert an FP value to 32-bit fixed point, rounding up

Description:

 FPR[ft] = convert_and_round(FPR[fs])

The value in FPR fs, in format fmt, is converted to a value in 32-bit word fixed point format and rounding toward +inf

(rounding mode 2). The result is placed in FPR ft.

When the source value is Infinity, NaN, or rounds to an integer outside the range -231 to 231-1, the result cannot be represented correctly, an IEEE Invalid Operation condition exists, and the Invalid Operation flag is set in the FCSR. If the Invalid Operation Enable bit is set in the FCSR, no result is written to fd and an Invalid Operation exception is taken immediately. Otherwise, a default result is written to ft. On cores with FCSRNAN2008=0, the default result is

231-1. On cores with FCSRNAN2008=1, the default result is:

231-1 when the input value is +inf or rounds to a number larger than 231-1

Restrictions:

The fields fs and fd must specify valid FPRs; fs for type fmt and fd for word fixed point. If the fields are not valid, the result is UNPREDICTABLE.

The operand must be a value in format fmt; if it is not, the result is UNPREDICTABLE and the value of the operand

FPR becomes UNPREDICTABLE.

Operation:

StoreFPR(ft, W, ConvertFmt(ValueFPR(fs, fmt), fmt, W))

Exceptions:

Coprocessor Unusable, Reserved Instruction

Floating Point Exceptions:

Invalid Operation, Unimplemented Operation, Inexact