Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RT:71407の ARMでテストが通らないという問題を修正しました。
ARMでテストが通らなかった原因は OABIという ABIに起因するものです。
詳しい資料があればいいのですが、見当たらない概要だけ。
OABIでは doubleの保存の方法が特殊で 8byteを 4byte + 4byteと分けて
データを保存します。double型の 1の表現は以下のようになります。
0000000000000ff3 : 一般的な little endian
00000ff300000000 : OABI ARM
なんで, OABIの場合は, 前の 4byteと後の 4byteをスワップしてから
エンコード、デコードをする必要があります。
私が直したのは PP版だけです。msgpack(sysdep.hにあるマクロ)が
そもそも OABIを考慮していないので、XS版ではこけているようです。
なお最近の ARM環境はほとんど EABIという ABIを使っているので、
上記の問題は発生しません。EABIでは他のアーキテクチャと同様の
格納方法になっています。
手元の Little endianの OABI ARMでテストをパスすることを確認しました。
bigendian ARMは環境がないのでテストしていません。
クロスコンパイラをつくってバイナリを確認したところ、little endianと
同様のバイトの並びだったので、たぶん動作すると思います。
確認のほどよろしくお願いします。