misc: Use compiler.hh macros when available.

Some places were hand coding __attribute__s when macros in compiler.hh
were available to do that job. Using the macros helps abstract away
compiler specific details and should be used when possible.

Change-Id: I94befebcfde2d673e874e9959588f69781bd9021
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35975
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2020-10-14 00:38:42 -07:00
parent b3dc64acb9
commit 463cb28ca5
5 changed files with 11 additions and 11 deletions

View File

@@ -2007,8 +2007,7 @@ let {{
destPred.reset();
for (unsigned i = 0; i < eCount; i++) {
const Element& srcElem1 = AA64FpOp1_x[i];
%(src_elem_2_ty)s srcElem2 __attribute__((unused)) =
%(src_elem_2)s;
M5_VAR_USED %(src_elem_2_ty)s srcElem2 = %(src_elem_2)s;
bool destElem = false;
if (tmpPred[i]) {
%(op)s

View File

@@ -243,7 +243,7 @@ class X86Linux32 : public X86Linux
{
public:
typedef struct {
typedef struct M5_ATTR_PACKED {
uint64_t st_dev;
uint8_t __pad0[4];
uint32_t __st_ino;
@@ -263,7 +263,7 @@ class X86Linux32 : public X86Linux
uint32_t st_ctimeX;
uint32_t st_ctime_nsec;
uint64_t st_ino;
} __attribute__((__packed__)) tgt_stat64;
} tgt_stat64;
static const int TGT_SIGHUP = 0x000001;
static const int TGT_SIGINT = 0x000002;