vine-users ML アーカイブ



[vine-users:055792] Re: long double の値

  • From: Haruhiko Okumura <okumura@xxxxxxxxxxxxxxxxx>
  • Subject: [vine-users:055792] Re: long double の値
  • Date: Sat, 16 Nov 2002 13:14:36 +0900 (JST)
奥村@松阪大です。

x86ではlong doubleは精度は10バイトですがABIレベルでは12バイトでアライ
ンしています。16バイトでアラインすることもできるようです。詳細はgccの
マニュアルを読んでください:

`-m128bit-long-double'
     Control the size of `long double' type. i386 application binary
     interface specify the size to be 12 bytes, while modern
     architectures (Pentium and newer) prefer `long double' aligned to
     8 or 16 byte boundary.  This is impossible to reach with 12 byte
     long doubles in the array accesses.

     *Warning:* if you use the `-m128bit-long-double' switch, the
     structures and arrays containing `long double' will change their
     size as well as function calling convention for function taking
     `long double' will be modified.

`-m96bit-long-double'
     Set the size of `long double' to 96 bits as required by the i386
     application binary interface.  This is the default.

-- 
Haruhiko Okumura <okumura@xxxxxxxxxxxxxxxxx>
Matsusaka University, 1846 Kubo-cho, Matsusaka, 515-8511 Japan
http://www.matsusaka-u.ac.jp/~okumura/