//===-- AMDILCompilerErrors.h ---------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//
//
//===----------------------------------------------------------------------===//

#ifndef _AMDIL_COMPILER_ERRORS_H_
#define _AMDIL_COMPILER_ERRORS_H_
// Compiler errors generated by the backend that will cause
// the runtime to abort compilation. These are mainly for
// device constraint violations or invalid code.
namespace amd {
#define INVALID_COMPUTE 0
#define GENERIC_ERROR 1
#define INTERNAL_ERROR 2
#define MISSING_FUNCTION_CALL 3
#define RESERVED_FUNCTION 4
#define BYTE_STORE_ERROR 5
#define UNKNOWN_TYPE_NAME 6
#define NO_IMAGE_SUPPORT 7
#define NO_ATOMIC_32 8
#define NO_ATOMIC_64 9
#define IRREDUCIBLE_CF 10
#define INSUFFICIENT_RESOURCES 11
#define INSUFFICIENT_LOCAL_RESOURCES 12
#define INSUFFICIENT_PRIVATE_RESOURCES 13
#define INSUFFICIENT_IMAGE_RESOURCES 14
#define DOUBLE_NOT_SUPPORTED 15
#define INVALID_CONSTANT_WRITE 16
#define INSUFFICIENT_CONSTANT_RESOURCES 17
#define INSUFFICIENT_COUNTER_RESOURCES 18
#define INSUFFICIENT_REGION_RESOURCES 19
#define REGION_MEMORY_ERROR 20
#define MEMOP_NO_ALLOCATION 21
#define RECURSIVE_FUNCTION 22
#define INCORRECT_COUNTER_USAGE 23
#define INVALID_INTRINSIC_USAGE 24
#define INSUFFICIENT_SEMAPHORE_RESOURCES 25
#define NO_SEMAPHORE_SUPPORT 26
#define INVALID_INIT_VALUE 27
#define NO_FLAT_SUPPORT 28
#define NUM_ERROR_MESSAGES 29

static const char *CompilerErrorMessage[NUM_ERROR_MESSAGES] =
{
  "E000:Compute Shader Not Supported!   ",
  "E001:Generic Compiler Error Message! ",
  "E002:Internal Compiler Error Message!",
  "E003:Missing Function Call Detected! ",
  "E004:Reserved Function Call Detected!",
  "E005:Byte Addressable Stores Invalid!",
  "E006:Kernel Arg Type Name Is Invalid!",
  "E007:Image Extension Unsupported!    ",
  "E008:32bit Atomic Op are Unsupported!",
  "E009:64bit Atomic Op are Unsupported!",
  "E010:Irreducible ControlFlow Detected",
  "E011:Insufficient Resources Detected!",
  "E012:Insufficient Local Resources!   ",
  "E013:Insufficient Private Resources! ",
  "E014:Images not currently supported! ",
  "E015:Double precision not supported! ",
  "E016:Invalid Constant Memory Write!  ",
  "E017:Max number Constant Ptr reached!",
  "E018:Max number of Counters reached! ",
  "E019:Insufficient Region Resources!  ",
  "E020:Region address space invalid!   ",
  "E021:MemOp with no memory allocated! ",
  "E022:Recursive Function detected!    ",
  "E023:Illegal Inc+Dec to same counter!",
  "E024:Illegal usage of intrinsic inst!",
  "E025:Insufficient Semaphore Resources",
  "E026:Semaphores not supported!       ",
  "E027:Semaphore init value is invalid!",
  "E028:Flat address is not supported!  "
};
}

#endif // _AMDIL_COMPILER_ERRORS_H_
