ソースを参照

[legacy] Align legacy drivers' __shared data to the maximum possible

Some drivers that still use the legacy-driver wrapper (tg3 in particular)
apparently do not specify their alignment constraints properly.  This
hack forces any __shared data to be maximally aligned.

Note that this provides only 16-byte alignment; it is not possible to
request alignment to any greater than 16 bytes using
__attribute__((aligned)), since the relocation code will preserve only 16
byte alignment (and operation under -DKEEP_IT_REAL cannot preserve more
that 16 byte alignment).

Idea proposed by Tim Hockin <thockin@google.com>
tags/v0.9.4
Michael Brown 17年前
コミット
0d91c37ce5
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      src/include/compiler.h

+ 1
- 1
src/include/compiler.h ファイルの表示

345
  * @endcode
345
  * @endcode
346
  *
346
  *
347
  */
347
  */
348
-#define __shared __asm__ ( "_shared_bss" )
348
+#define __shared __asm__ ( "_shared_bss" ) __aligned
349
 
349
 
350
 /**
350
 /**
351
  * Optimisation barrier
351
  * Optimisation barrier

読み込み中…
キャンセル
保存