V850付録基板でOgg Vorbisプレイヤー(4)
Posted by arms22 on 2007年05月15日

gcc/config/v850/lib1funcs.asmでエラーが発生する原因を特定することができましたのでパッチを公開します。原因は処理系に依存するコードを使っていた為でbinutils-2.17/gas/config/tc-v850.c
1567行目で次のようなコードを発見しました。
max = (1 << operand->bits) - 1; if (! warn_unsigned_overflows) min = -(1 << (operand->bits - 1)); else min = 0; } if (val < (offsetT) min || val > (offsetT) max)operand->bits == -1 の時、i386環境ではmaxの値は2147483647、ppc環境では-1となります。其の為、次の行の範囲チェックで 0(val) > -1(max) となりエラーになっているようです。次のようにコードを修正することでエラーはなくなりました。
if (operand->bits < 0) max = (1 << (32 + operand->bits)) - 1; else max = (1 << operand->bits) - 1;以下はV850クロス開発環境に使用したパッケージとコンパイル手順です。
追記 5/18:コンパイル環境はMacOSX10.3.9、gcc 3.3
binutils-2.17
http://sources.redhat.com/binutils
gcc-4.1.2
http://gcc.gnu.org/
newlib-1.15.0
http://sources.redhat.com/newlib/
% cp tc-v850-patch binutils-2.17/gas/config/tc-v850-patch % cd binutils-2.17/gas/config % patch < tc-v850-patch % cd ../../ % mkdir build-v850 % cd build-v850 % ../configure --target=v850-elf % make % sudo make install % cd ../../gcc-4.1.2 % mkdir build-v850 % cd build-v850 % ../configure --target=v850-elf --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c --disable-libssp --disable-shared --without-include-headers % make % sudo make install % cd ../../newlib-1.15.0 % mkdir build-v850 % cd build-v850 % ../configure --target=v850-elf % make % sudo make install
Ads by Google
0 Comments
Leave a reply
該当の記事は見つかりませんでした。