Skip to content

Commit

Permalink
arch/tile: factor out <arch/opcode.h> header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Metcalf committed Nov 3, 2011
1 parent aeddea5 commit eb7c792
Show file tree
Hide file tree
Showing 15 changed files with 4,536 additions and 4,359 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010 Tilera Corporation. All Rights Reserved.
* Copyright 2011 Tilera Corporation. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand All @@ -12,15 +12,10 @@
* more details.
*/

#ifndef _ASM_TILE_OPCODE_CONSTANTS_H
#define _ASM_TILE_OPCODE_CONSTANTS_H

#include <arch/chip.h>

#if CHIP_WORD_SIZE() == 64
#include <asm/opcode_constants_64.h>
#if defined(__tilepro__)
#include <arch/opcode_tilepro.h>
#elif defined(__tilegx__)
#include <arch/opcode_tilegx.h>
#else
#include <asm/opcode_constants_32.h>
#error Unexpected Tilera chip type
#endif

#endif /* _ASM_TILE_OPCODE_CONSTANTS_H */
Loading

0 comments on commit eb7c792

Please sign in to comment.