Skip to content

Commit eb7c792

Browse files
arch/tile: factor out <arch/opcode.h> header
The kernel code was using some <asm> headers that included a mix of hardware-specific information (typically found in Tilera <arch> headers) and structures, enums, and function declarations supporting the disassembly function of the tile-desc.c sources. This change refactors that code so that a hardware-specific, but OS- and application-agnostic header, is created: <arch/opcode.h>. This header is then exported to userspace along with the other <arch> headers and can be used to build userspace code; in particular, it is used by glibc as part of implementing the backtrace() function. The new header, together with a header that specifically describes the disassembly code (<asm/tile-desc.h> with _32 and _64 variants), replaces the old <asm/opcode-tile*.h> and <asm/opcode_constants*.h> headers. As part of this change, we are also renaming the 32-bit constants from TILE_xxx to TILEPRO_xxx to better reflect the fact that they are specific to the TILEPro architecture, and not to TILE-Gx and any successor "tile" architecture chips. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
1 parent aeddea5 commit eb7c792

15 files changed

Lines changed: 4536 additions & 4359 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010 Tilera Corporation. All Rights Reserved.
2+
* Copyright 2011 Tilera Corporation. All Rights Reserved.
33
*
44
* This program is free software; you can redistribute it and/or
55
* modify it under the terms of the GNU General Public License
@@ -12,15 +12,10 @@
1212
* more details.
1313
*/
1414

15-
#ifndef _ASM_TILE_OPCODE_CONSTANTS_H
16-
#define _ASM_TILE_OPCODE_CONSTANTS_H
17-
18-
#include <arch/chip.h>
19-
20-
#if CHIP_WORD_SIZE() == 64
21-
#include <asm/opcode_constants_64.h>
15+
#if defined(__tilepro__)
16+
#include <arch/opcode_tilepro.h>
17+
#elif defined(__tilegx__)
18+
#include <arch/opcode_tilegx.h>
2219
#else
23-
#include <asm/opcode_constants_32.h>
20+
#error Unexpected Tilera chip type
2421
#endif
25-
26-
#endif /* _ASM_TILE_OPCODE_CONSTANTS_H */

0 commit comments

Comments
 (0)