• 検索結果がありません。

・ SSE3

5.2. x87 FPU 命令

x87 FPU

命令は、プロセッサの

x87 FPU

によって実行される。これらの命令は、浮動

小数点オペランド、整数オペランド、2進化

10

進数(BCD)オペランドを操作する。

x87 FPU 命令についての詳細は、第 8

章「x87 FPU によるプログラミング」を参照の こと。

この命令は、データ転送命令、定数ロード命令、

FPU

制御命令の各サブグループに分 けられる。以下の各項では、各サブグループについて説明する。

5.2.1. x87 FPU

データ転送命令

データ転送命令は、メモリと

x87 FPU

レジスタの間で、浮動小数点値、整数値、BCD 値を転送する。また、データ転送命令は、浮動小数点オペランドの条件付き転送操作 も実行する。

FLD Load floating-point value

浮動小数点値をロード

FST Store floating-point value

浮動小数点値をストア FSTP Store floating-point value and pop

浮動小数点値をストアしてポップ

FILD Load integer

整数をロード

FIST Store integer

整数をストア

命令セットの要約

5

FISTP1 Store integer and pop 整数をストアしてポップ

FBLD Load BCD

BCD をロード

FBSTP Store BCD and pop

BCD をストアしてポップ

FXCH Exchange registers

レジスタを交換

FCMOVE Floating-point conditional move if equal 等しい場合は浮動小数点値の条件付き転送 FCMOVNE Floating-point conditional move if not equal

等しくない場合は浮動小数点値の条件付き転送 FCMOVB Floating-point conditional move if below

より小さい場合は浮動小数点値の条件付き転送 FCMOVBE Floating-point conditional move if below or equal

より小さいか等しい場合は浮動小数点値の条件付き転送 FCMOVNB Floating-point conditional move if not below

より小さくない場合は浮動小数点値の条件付き転送 FCMOVNBE Floating-point conditional move if not below or equal

より小さくなく等しくない場合は浮動小数点値の条件付き転送 FCMOVU Floating-point conditional move if unordered

順序化不可能の場合は浮動小数点値の条件付き転送 FCMOVNU Floating-point conditional move if not unordered

順序化不可能でない場合は浮動小数点値の条件付き転送

5.2.2. x87 FPU

基本算術命令

基本算術命令は、浮動小数点オペランドと整数オペランドの基本算術演算を実行す る。

FADD Add floating-point

浮動小数点値を加算 FADDP Add floating-point and pop

浮動小数点値を加算してポップ

FIADD Add integer

整数を加算

FSUB Subtract floating-point

浮動小数点値を減算 FSUBP Subtract floating-point and pop

浮動小数点値を減算してポップ

1. SSE3 では、整数変換用に FISTTP 命令を提供。

IA-32 インテル® アーキテクチャ・ソフトウェア・デベロッパーズ・マニュアル 上巻:基本アーキテクチャ

5-16

FISUB Subtract integer

整数を減算

FSUBR Subtract floating-point reverse 浮動小数点値を逆減算

FSUBRP Subtract floating-point reverse and pop 浮動小数点値を逆減算してポップ FISUBR Subtract integer reverse

整数を逆減算

FMUL Multiply floating-point

浮動小数点値を乗算 FMULP Multiply floating-point and pop

浮動小数点値を乗算してポップ

FIMUL Multiply integer

整数を乗算

FDIV Divide floating-point

浮動小数点値を除算 FDIVP Divide floating-point and pop

浮動小数点値を除算してポップ

FIDIV Divide integer

整数を除算

FDIVR Divide floating-point reverse 浮動小数点値を逆除算

FDIVRP Divide floating-point reverse and pop 浮動小数点値を逆除算してポップ

FIDIVR Divide integer reverse

整数を逆除算

FPREM Partial remainder

部分剰余

FPREM1 IEEE Partial remainder

IEEE 部分剰余

FABS Absolute value

絶対値

FCHS Change sign

符号を変更

FRNDINT Round to integer

整数への丸め

FSCALE Scale by power of two

2のべき乗でスケーリング

FSQRT Square root

平方根

FXTRACT Extract exponent and significand 指数部と仮数部を抽出

命令セットの要約

5

5.2.3. x87 FPU

比較命令

比較命令は、浮動小数点オペランドまたは整数オペランドのチェックまたは比較を実 行する。

FCOM Compare floating-point

浮動小数点値を比較 FCOMP Compare floating-point and pop

浮動小数点値を比較してポップ FCOMPP Compare floating-point and pop twice

浮動小数点値を比較して2回ポップ FUCOM Unordered compare floating-point

順序化不可能条件付きで浮動小数点値を比較 FUCOMP Unordered compare floating-point and pop

順序化不可能条件付きで浮動小数点値を比較してポップ FUCOMPP Unordered compare floating-point and pop twice

順序化不可能条件付きで浮動小数点値を比較して2回ポップ

FICOM Compare integer

整数を比較

FICOMP Compare integer and pop

整数を比較してポップ

FCOMI Compare floating-point and set EFLAGS 浮動小数点値を比較して EFLAGS をセット FUCOMI Unordered compare floating-point and set EFLAGS

順序化不可能条件付きで浮動小数点値を比較して EFLAGS を セット

FCOMIP Compare floating-point, set EFLAGS, and pop

浮動小数点値を比較し、EFLAGS をセットしてポップ FUCOMIP Unordered compare floating-point, set EFLAGS, and pop

順序化不可能条件付きで浮動小数点値を比較し、EFLAGS をセッ トしてポップ

FTST Test floating-point

浮動小数点値をテスト

FXAM Examine floating-point

浮動小数点値を検査

5.2.4. x87 FPU

超越関数命令

超越関数命令は、浮動小数点オペランドの基本的な三角関数演算と対数演算を実行す る。

FSIN Sine

正弦

IA-32 インテル® アーキテクチャ・ソフトウェア・デベロッパーズ・マニュアル 上巻:基本アーキテクチャ

5-18

FCOS Cosine

余弦

FSINCOS Sine and cosine

正弦と余弦

FPTAN Partial tangent

部分正接

FPATAN Partial arctangent

部分逆正接

F2XM1 2x − 1

FYL2X y∗log2x

FYL2XP1 y∗log2(x+1)

5.2.5. x87 FPU 定数ロード命令

定数ロード命令は、π などの一般的な定数を

x87 FPU

レジスタにロードする。

FLD1 Load +1.0

+1.0をロード

FLDZ Load +0.0

+0.0をロード

FLDPI Load π

πをロード

FLDL2E Load log2e

log2e をロード

FLDLN2 Load loge2

loge2をロード

FLDL2T Load log210

log210をロード

FLDLG2 Load log102

log102をロード

5.2.6. x87 FPU

制御命令

x87 FPU

制御命令は、x87 FPUレジスタスタックを操作し、

x87 FPU

ステートのセーブ とリストアを行う。

FINCSTP Increment FPU register stack pointer

FPU レジスタのスタックポインタをインクリメント FDECSTP Decrement FPU register stack pointer

FPU レジスタのスタックポインタをデクリメント FFREE Free floating-point register

浮動小数点レジスタを解放

命令セットの要約

5

FINIT Initialize FPU after checking error conditions エラー条件をチェックしてから FPU を初期化 FNINIT Initialize FPU without checking error conditions

エラー条件をチェックせずに FPU を初期化

FCLEX Clear floating-point exception flags after checking for error conditions エラー条件をチェックしてから浮動小数点例外フラグをクリア FNCLEX Clear floating-point exception flags without checking for error conditions

エラー条件をチェックせずに浮動小数点例外フラグをクリア FSTCW Store FPU control word after checking error conditions

エラー条件をチェックしてから FPU 制御ワードをストア FNSTCW Store FPU control word without checking error conditions

エラー条件をチェックせずに FPU 制御ワードをストア

FLDCW Load FPU control word

FPU 制御ワードをロード

FSTENV Store FPU environment after checking error conditions エラー条件をチェックしてから FPU 環境をストア FNSTENV Store FPU environment without checking error conditions

エラー条件をチェックせずに FPU 環境をストア

FLDENV Load FPU environment

FPU 環境をロード

FSAVE Save FPU state after checking error conditions

エラー条件をチェックしてから FPU ステートをセーブ FNSAVE Save FPU state without checking error conditions

エラー条件をチェックせずに FPU ステートをセーブ

FRSTOR Restore FPU state

FPU ステートをリストア

FSTSW Store FPU status word after checking error conditions

エラー条件をチェックしてから FPU ステータス・ワードをストア FNSTSW Store FPU status word without checking error conditions

エラー条件をチェックせずに FPU ステータス・ワードをストア

WAIT/FWAIT Wait for FPU

FPU を待機

FNOP FPU no operation

FPU の非操作

IA-32 インテル® アーキテクチャ・ソフトウェア・デベロッパーズ・マニュアル 上巻:基本アーキテクチャ

5-20