Author: dcoakley
Date: 2010-10-13 18:55:13 -0400 (Wed, 13 Oct 2010)
New Revision: 3374
Modified:
trunk/osprey/common/targ_info/abi/x8664/abi_properties.cxx
trunk/osprey/common/targ_info/access/ti_asm.c
trunk/osprey/common/targ_info/access/ti_res_count.c
trunk/osprey/common/targ_info/access/ti_si.h
trunk/osprey/common/targ_info/access/ti_si_types.h
trunk/osprey/common/targ_info/generate/abi_properties_gen.cxx
trunk/osprey/common/targ_info/generate/gen_util.cxx
trunk/osprey/common/targ_info/generate/isa_bundle_gen.cxx
trunk/osprey/common/targ_info/generate/isa_decode_gen.cxx
trunk/osprey/common/targ_info/generate/isa_enums_gen.cxx
trunk/osprey/common/targ_info/generate/isa_gen.cxx
trunk/osprey/common/targ_info/generate/isa_hazards_gen.cxx
trunk/osprey/common/targ_info/generate/isa_lits_gen.cxx
trunk/osprey/common/targ_info/generate/isa_operands_gen.cxx
trunk/osprey/common/targ_info/generate/isa_pack_gen.cxx
trunk/osprey/common/targ_info/generate/isa_print_gen.cxx
trunk/osprey/common/targ_info/generate/isa_properties_gen.cxx
trunk/osprey/common/targ_info/generate/isa_pseudo_gen.cxx
trunk/osprey/common/targ_info/generate/isa_registers_gen.cxx
trunk/osprey/common/targ_info/generate/isa_subset_gen.cxx
trunk/osprey/common/targ_info/generate/proc_gen.cxx
trunk/osprey/common/targ_info/generate/proc_properties_gen.cxx
trunk/osprey/common/targ_info/generate/si_gen.cxx
trunk/osprey/common/targ_info/generate/si_gen.h
trunk/osprey/common/targ_info/isa/x8664/isa.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_bundle.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_decode.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_enums.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_hazards.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_lits.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_operands.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_pack.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_print.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_properties.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_pseudo.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_registers.cxx
trunk/osprey/common/targ_info/isa/x8664/isa_subset.cxx
trunk/osprey/common/targ_info/proc/x8664/proc.cxx
trunk/osprey/common/targ_info/proc/x8664/proc_properties.cxx
Log:
Clean up targ_info compilation warnings and fix portability issues.
o Remove extraneous "const" qualifiers in typedefs (bugs 624 and 658).
o Prefer standard C headers, functions and constants (bug 622).
o Use standard C++ main() function declarations; clean up open files.
o Treat string literals as constant data.
o Remove unnecessary TARG_SL ifdefs. The whole point of targ_info is
to handle architecture differences in a clean way.
o Fix typos and discrepancies in ti_si.h interface documentation.
o Initialize C++ class members in the order of declaration.
o Improve style based on output of -Wall warnings and static analysis.
Approved by: Jian-Xin Lai
Modified: trunk/osprey/common/targ_info/abi/x8664/abi_properties.cxx
===================================================================
--- trunk/osprey/common/targ_info/abi/x8664/abi_properties.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/abi/x8664/abi_properties.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -252,7 +252,7 @@
}
-main()
+int main()
{
ABI_Properties_Begin( "x8664" );
@@ -272,4 +272,6 @@
x86_64_abi();
ABI_Properties_End();
+
+ return 0;
}
Modified: trunk/osprey/common/targ_info/access/ti_asm.c
===================================================================
--- trunk/osprey/common/targ_info/access/ti_asm.c 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/access/ti_asm.c 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -44,7 +44,7 @@
#include <stdio.h>
#include <assert.h>
-#include <strings.h>
+#include <string.h>
#include "topcode.h"
#include "targ_isa_operands.h"
@@ -84,8 +84,8 @@
INT64 bopnd[ISA_OPERAND_max_operands];
INT64 bresult[ISA_OPERAND_max_results];
- BCOPY(opnd, bopnd, sizeof(bopnd));
- BCOPY(result, bresult, sizeof(bresult));
+ memmove(bopnd, opnd, sizeof(bopnd));
+ memmove(bresult, result, sizeof(bresult));
topcode = ISA_PSEUDO_Translate(topcode,
bresult,
@@ -594,8 +594,8 @@
/* Unpack the raw operands and results.
*/
- BZERO(result, sizeof(*result) * ISA_OPERAND_max_results);
- BZERO(opnd, sizeof(*opnd) * ISA_OPERAND_max_operands);
+ memset(result, 0, sizeof(*result) * ISA_OPERAND_max_results);
+ memset(opnd, 0, sizeof(*opnd) * ISA_OPERAND_max_operands);
pinfo = ISA_PACK_Info(topcode);
words = ISA_PACK_Inst_Words(topcode);
for (j = 0; j < words; ++j) {
Modified: trunk/osprey/common/targ_info/access/ti_res_count.c
===================================================================
--- trunk/osprey/common/targ_info/access/ti_res_count.c 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/access/ti_res_count.c 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -37,6 +37,7 @@
static const char source_file[] = __FILE__;
static const char rcs_id[] = "$Source:
/proj/osprey/CVS/open64/osprey1.0/common/targ_info/access/ti_res_count.c,v $
$Revision: 1.1.1.1 $";
+#include <string.h>
#include <stdio.h>
#include <math.h> /* for ceil */
@@ -78,8 +79,8 @@
TI_RES_COUNT *counts = TYPE_MEM_POOL_ALLOC(TI_RES_COUNT, pool);
counts->vec = TYPE_MEM_POOL_ALLOC_N(double, pool, SI_resource_count);
if ( !MEM_POOL_Zeroed(pool) ) {
- BZERO(counts->vec, sizeof(double) * SI_resource_count);
- BZERO(counts->bad_ii, sizeof(counts->bad_ii));
+ memset(counts->vec, 0, sizeof(double) * SI_resource_count);
+ memset(counts->bad_ii, 0, sizeof(counts->bad_ii));
}
return counts;
}
Modified: trunk/osprey/common/targ_info/access/ti_si.h
===================================================================
--- trunk/osprey/common/targ_info/access/ti_si.h 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/access/ti_si.h 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -40,7 +40,7 @@
*/
-/* si.h
+/* ti_si.h
************************************
*
* Description:
@@ -70,8 +70,8 @@
* Return the value of an initalized (no reserved
* resources) resource reservation entry.
*
- * SI_RRW SI_RRW_Reserve( SI_RRW table, SI_RRW request )
- * Reserve the resource in <request> from <table> and
+ * SI_RRW SI_RRW_Reserve( SI_RRW table, SI_RRW requirement )
+ * Reserve the resource in <requirement> from <table> and
* return the result. IMPORTANT: The resources might not
* be available, the the result must be checked (see
* immediately below).
@@ -112,10 +112,10 @@
* An integer type which Represents a single type of resource.
* It may also be used by the client as an index into a table of
* counts. The size of such a table should be the number of
- * differetn types of resource defined for the hardware target, a
+ * different types of resource defined for the hardware target, a
* value given by:
*
- * INT SI_rexource_count
+ * INT SI_resource_count
*
* The following access functions are defined for
* SI_RESOURCE_IDs:
@@ -140,7 +140,7 @@
* Return the RESOURCE_ID whose usage is described by
* <total>.
*
- * UINT SI_RESOURCE_TOTAL_Total_Used(
+ * INT SI_RESOURCE_TOTAL_Total_Used(
* SI_RESOURCE_TOTAL* total
* )
* Return the usage count of the RESOURCE_ID whose usage
@@ -203,7 +203,7 @@
* be added to the operand access and result available
* times.
*
- * INT SI_ISSUE_SLOT_Avail_Per_Cycle( SI_SCHED_INFO* slot )
+ * INT SI_ISSUE_SLOT_Avail_Per_Cycle( SI_ISSUE_SLOT* slot )
* How many instructions can occupy <slot> per cycle.
*
* Access to all the issue slots in the machine is provided by:
@@ -237,7 +237,7 @@
* SI_BAD_II_SET s1 )
* Return the union of the given sets.
*
- * bool SI_BAD_II_SET_MemberP( SI_BAD_II_SET s, INT i )
+ * bool SI_BAD_II_SET_MemberP( SI_BAD_II_SET s, UINT i )
* Is <i> a member of <s>?
*
* SI_BAD_II_SET SI_BAD_II_SET_Empty()
@@ -260,18 +260,18 @@
* INT TSI_Operand_Access_Time( TOP top, INT operand_index )
* Time <top> accesses it's <operand_index>'th operand.
*
- * INT TSI_Result_Avail_Time( TOP top,INT result_index )
+ * INT TSI_Result_Available_Time( TOP top, INT result_index )
* Time <top> makes it's <result_index>'th result available.
*
* INT TSI_Load_Access_Time( TOP top )
- * Time <top> (a load) reads it's value from memory.
+ * Time <top> (a load) reads its value from memory.
*
* INT TSI_Last_Issue_Cycle( TOP top )
* Time <top> issues its last instruction (non-zero only
* for simulated instructions).
*
- * INT TSI_Store_Avail_Time( TOP top )
- * Time <top> (a store) makes it's result available in memory.
+ * INT TSI_Store_Available_Time( TOP top )
+ * Time <top> (a store) makes its result available in memory.
*
* SS_RR TSI_Resource_Requirement( TOP top )
* Resource requirement to schedule <top>.
@@ -527,9 +527,9 @@
return table + requirement;
}
-inline SI_RRW SI_RRW_Has_Overuse( SI_RRW word_with_reservations )
+inline SI_RRW SI_RRW_Has_Overuse( SI_RRW table_entry )
{
- return (word_with_reservations & SI_RRW_overuse_mask) != 0;
+ return (table_entry & SI_RRW_overuse_mask) != 0;
}
inline SI_RRW SI_RRW_Unreserve( SI_RRW table, SI_RRW requirement )
@@ -698,12 +698,10 @@
return SI_top_si[(INT) top]->rr;
}
-#if defined(TARG_SL)
inline SI_RR TSI_Alternative_Resource_Requirement( TOP top )
{
return SI_top_si[(INT) top]->alter_rr;
}
-#endif
inline SI_BAD_II_SET TSI_Bad_IIs( TOP top )
{
Modified: trunk/osprey/common/targ_info/access/ti_si_types.h
===================================================================
--- trunk/osprey/common/targ_info/access/ti_si_types.h 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/access/ti_si_types.h 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -50,7 +50,7 @@
typedef enum topcode TOPCODE;
-#include <topcode.h>
+#include "topcode.h"
/****************************************************************************
****************************************************************************/
@@ -66,7 +66,7 @@
typedef UINT SI_RESOURCE_ID;
-typedef const struct {
+typedef struct {
const char* name;
SI_RESOURCE_ID id;
mUINT8 avail_per_cycle;
@@ -89,7 +89,7 @@
/****************************************************************************
****************************************************************************/
-typedef const struct {
+typedef struct {
const char* name;
mINT32 skew;
mINT32 avail_per_cycle;
@@ -98,7 +98,7 @@
/****************************************************************************
****************************************************************************/
-typedef const struct {
+typedef struct {
SI_RESOURCE* resource;
mINT32 total_used;
} SI_RESOURCE_TOTAL;
@@ -112,7 +112,7 @@
****************************************************************************/
typedef UINT SI_ID;
-typedef const struct {
+typedef struct {
const char* name;
SI_ID id;
const mUINT8 *operand_access_times;
@@ -121,9 +121,7 @@
mINT32 last_issue_cycle;
mINT32 store_available_time;
SI_RR rr;
-#if defined(TARG_SL)
SI_RR alter_rr;
-#endif
const SI_RESOURCE_ID_SET *resources_used;
mUINT32 ii_info_size;
const SI_RR *ii_rr;
Modified: trunk/osprey/common/targ_info/generate/abi_properties_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/abi_properties_gen.cxx
2010-10-13 21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/abi_properties_gen.cxx
2010-10-13 22:55:13 UTC (rev 3374)
@@ -51,7 +51,6 @@
// $Author: marcel $
// $Source:
/proj/osprey/CVS/open64/osprey1.0/common/targ_info/generate/abi_properties_gen.cxx,v
$
-#include <strings.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
@@ -207,7 +206,7 @@
result->name = name;
#if ISA_REGISTER_MAX < NUM_REGISTERS_LIMIT
- BZERO(result->reg_names, sizeof(result->reg_names));
+ memset(result->reg_names, 0, sizeof(result->reg_names));
#endif
current_abi = result;
@@ -268,10 +267,10 @@
// See interface description.
/////////////////////////////////////
{
- int reg_num;
bool used = false;
#if ISA_REGISTER_MAX < NUM_REGISTERS_LIMIT
+ int reg_num;
for (reg_num = minreg; reg_num <= maxreg; ++reg_num) {
current_abi->reg_flags[rc][reg_num].push_back(prop);
used = true;
@@ -654,4 +653,8 @@
}
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/gen_util.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/gen_util.cxx 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/generate/gen_util.cxx 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -138,7 +138,7 @@
pos = fprintf(hfile, "#define %s%s ", prefix, def->name);
while (pos++ < 40) fputc(' ', hfile);
fprintf(hfile, "(\"");
- while (c = *s++) {
+ while ((c = *s++) != '\0') {
if (c == '\\') {
fprintf(hfile, "\\\\");
} else if (c < ' ') {
Modified: trunk/osprey/common/targ_info/generate/isa_bundle_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_bundle_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_bundle_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -55,7 +55,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
-#include <strings.h>
+#include <string.h>
#include <list>
#include <vector>
#include "topcode.h"
@@ -357,7 +357,7 @@
++iei) {
}
- char *int_suffix;
+ const char *int_suffix;
// select the ISA_EXEC_unit_prop based on the number of exec info types.
if (index <= 8) {
info_index_type = "mUINT8";
@@ -461,9 +461,11 @@
}
fprintf (cfile, " {\n \"template_MAX\", \"\", -1,\n { -1 /* ???????
*/");
for (i = 1; i < max_slots; ++i) fprintf (cfile, ", -1 /* ??????? */");
- fprintf (cfile, ",},\n { FALSE");
+ fprintf (cfile, " },\n { FALSE");
for (i = 1; i < max_slots; ++i) fprintf (cfile, ", FALSE");
- fprintf (cfile, ",},\n -1, 0x0, 0x%0*x\n }\n};\n", slot_mask_digits, 0);
+ fprintf (cfile, " },\n { 0");
+ for (i = 1; i < max_slots; ++i) fprintf (cfile, ", 0");
+ fprintf (cfile, " },\n -1, 0x0, 0x%0*x\n }\n};\n", slot_mask_digits, 0);
fprintf(hfile,"\n#define ISA_MAX_BUNDLES %d\n",num_bundles);
@@ -627,7 +629,7 @@
}
bundle_pack_info = new(BUNDLE_PACK_INFO);
- BZERO(bundle_pack_info, sizeof(*bundle_pack_info));
+ memset(bundle_pack_info, 0, sizeof(*bundle_pack_info));
bundle_pack_info->endian = endian;
}
Modified: trunk/osprey/common/targ_info/generate/isa_decode_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_decode_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_decode_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -417,4 +417,8 @@
}
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/isa_enums_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_enums_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_enums_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -160,7 +160,7 @@
}
-static char*
+static const char*
Print_ECV_EName (const char *name)
{
// will print direct to file, so can use temp buffers
@@ -191,7 +191,7 @@
return buf;
}
-static char*
+static const char*
Print_ECV_Name (ECV_struct ecv)
{
if (ecv.ecv_int == UNDEFINED) {
@@ -299,4 +299,8 @@
"}\n\n");
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/isa_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_gen.cxx 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_gen.cxx 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -247,4 +247,8 @@
"}\n");
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/isa_hazards_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_hazards_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_hazards_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -56,7 +56,7 @@
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
-#include <strings.h>
+#include <string.h>
#include <assert.h>
#include <list>
#include "topcode.h"
@@ -157,7 +157,7 @@
/////////////////////////////////////
{
ISA_HAZARD result = new isa_hazard;
- BZERO(result, sizeof(isa_hazard));
+ memset(result, 0, sizeof(isa_hazard));
hazards.push_back(result);
result->name = name;
return result;
@@ -174,7 +174,7 @@
int count = 0;
current_haz_desc = new haz_desc;
- BZERO(current_haz_desc, sizeof(haz_desc));
+ memset(current_haz_desc, 0, sizeof(haz_desc));
va_start(ap,topcode);
for (opcode = topcode;
@@ -417,4 +417,8 @@
"}\n");
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(efile);
+ fclose(cfile);
}
Modified: trunk/osprey/common/targ_info/generate/isa_lits_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_lits_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_lits_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -206,8 +206,8 @@
va_list ap;
LIT_RANGE range;
bool is_signed = type == SIGNED;
- long long min = is_signed ? LONG_LONG_MAX : ULONG_LONG_MAX;
- long long max = is_signed ? LONG_LONG_MIN : 0;
+ long long min = is_signed ? LLONG_MAX : ULLONG_MAX;
+ long long max = is_signed ? LLONG_MIN : 0;
int num_ranges = 0;
// Find the smallest min and largest max for all ranges, and
Modified: trunk/osprey/common/targ_info/generate/isa_operands_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_operands_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_operands_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -54,8 +54,6 @@
// $Author: marcel $
// $Source:
/proj/osprey/CVS/open64/osprey1.0/common/targ_info/generate/isa_operands_gen.cxx,v
$
-typedef struct operand_value_type *OPERAND_VALUE_TYPE;
-
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
@@ -946,4 +944,8 @@
"}\n");
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/isa_pack_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_pack_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_pack_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -243,14 +243,14 @@
for (i = 0; i < MAX_LISTING_OPERANDS; ++i) {
char buf[80];
if (i == END) {
- comp_name[i] = "ISA_PACK_COMP_end";
+ comp_name[i] = strdup("ISA_PACK_COMP_end");
} else if (i == OPND) {
- comp_name[i] = "ISA_PACK_COMP_opnd";
+ comp_name[i] = strdup("ISA_PACK_COMP_opnd");
} else if (i > OPND && i < (OPND + MAX_OPNDS)) {
sprintf(buf, "ISA_PACK_COMP_opnd+%d", i - OPND);
comp_name[i] = strdup(buf);
} else if (i == RESULT) {
- comp_name[i] = "ISA_PACK_COMP_result";
+ comp_name[i] = strdup("ISA_PACK_COMP_result");
} else {
assert(i > RESULT && i < (RESULT + MAX_RESULTS));
sprintf(buf, "ISA_PACK_COMP_result+%d", i - RESULT);
@@ -780,7 +780,6 @@
index = 1;
for ( isi = all_packs.begin(); isi != all_packs.end(); ++isi ) {
ISA_PACK_TYPE curr_ptype = *isi;
- i = 0;
if (curr_ptype->oadj.begin() != curr_ptype->oadj.end()) {
curr_ptype->adj_index = index;
for ( ioi = curr_ptype->oadj.begin();
@@ -866,4 +865,8 @@
"}\n");
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/isa_print_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_print_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_print_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -180,7 +180,7 @@
const char* Print_Name(int print_index)
/////////////////////////////////////
{
- static char *comp_name[MAX_LISTING_OPERANDS];
+ static const char *comp_name[MAX_LISTING_OPERANDS];
static bool initialized;
if (!initialized) {
@@ -188,20 +188,20 @@
for (i = 0; i < MAX_LISTING_OPERANDS; ++i) {
char buf[80];
if (i == END) {
- comp_name[i] = "ISA_PRINT_COMP_end";
+ comp_name[i] = strdup("ISA_PRINT_COMP_end");
} else if (i == NAME) {
- comp_name[i] = "ISA_PRINT_COMP_name";
+ comp_name[i] = strdup("ISA_PRINT_COMP_name");
#if defined(TARG_X8664) || defined(TARG_LOONGSON)
} else if (i == SEGMENT) {
- comp_name[i] = "ISA_PRINT_COMP_segment";
+ comp_name[i] = strdup("ISA_PRINT_COMP_segment");
#endif
} else if (i == OPND) {
- comp_name[i] = "ISA_PRINT_COMP_opnd";
+ comp_name[i] = strdup("ISA_PRINT_COMP_opnd");
} else if (i > OPND && i < (OPND + MAX_OPNDS)) {
sprintf(buf, "ISA_PRINT_COMP_opnd+%d", i - OPND);
comp_name[i] = strdup(buf);
} else if (i == RESULT) {
- comp_name[i] = "ISA_PRINT_COMP_result";
+ comp_name[i] = strdup("ISA_PRINT_COMP_result");
} else {
assert(i > RESULT && i < (RESULT + MAX_RESULTS));
sprintf(buf, "ISA_PRINT_COMP_result+%d", i - RESULT);
@@ -358,7 +358,7 @@
const char comma = ',';
const char space = ' ';
const char * const isa_print_type_format = "\t/* %s[%d] */";
- const char * const isa_print_format_format = " { %-14s ";
+ const char * const isa_print_format_format = " { %s {\n";
const char * const isa_print_args_format = " %s%c";
int top;
bool err;
@@ -430,7 +430,7 @@
fprintf (cfile, isa_print_format_format, "\"\",");
fprintf (cfile, isa_print_args_format, Print_Name(END), space);
- fprintf (cfile, "},");
+ fprintf (cfile, "} },");
fprintf (cfile, isa_print_type_format, "print_NULL", 0);
fprintf (cfile, "\n");
for ( isi = all_prints.begin(); isi != all_prints.end(); ++isi ) {
@@ -445,7 +445,7 @@
fprintf (cfile, "\n%19s", "");
}
fprintf (cfile, isa_print_args_format, Print_Name(END), space);
- fprintf (cfile, "},");
+ fprintf (cfile, "} },");
fprintf (cfile, isa_print_type_format,
curr_type->type->name,
curr_type->args);
Modified: trunk/osprey/common/targ_info/generate/isa_properties_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_properties_gen.cxx
2010-10-13 21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_properties_gen.cxx
2010-10-13 22:55:13 UTC (rev 3374)
@@ -176,8 +176,8 @@
}
}
- char *int_type;
- char *int_suffix;
+ const char *int_type;
+ const char *int_suffix;
int int_size;
if (isa_property_count <= 8) {
int_type = "mUINT8";
@@ -249,4 +249,8 @@
}
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/isa_pseudo_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_pseudo_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_pseudo_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -54,7 +54,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
-#include <strings.h>
+#include <string.h>
#include <alloca.h>
#include <list>
#include <vector>
@@ -182,7 +182,7 @@
{
cur_pseudo = new PSEUDO_OP_INFO;
pseudos.push_back(cur_pseudo);
- BZERO(cur_pseudo, sizeof(PSEUDO_OP_INFO));
+ memset(cur_pseudo, 0, sizeof(PSEUDO_OP_INFO));
cur_pseudo->from_opc = machine;
cur_pseudo->to_opc = pseudo;
cur_pseudo->dir = MACHINE_TO_PSEUDO;
@@ -198,7 +198,7 @@
{
cur_pseudo = new PSEUDO_OP_INFO;
pseudos.push_back(cur_pseudo);
- BZERO(cur_pseudo, sizeof(PSEUDO_OP_INFO));
+ memset(cur_pseudo, 0, sizeof(PSEUDO_OP_INFO));
cur_pseudo->from_opc = pseudo;
cur_pseudo->to_opc = machine;
cur_pseudo->dir = PSEUDO_TO_MACHINE;
Modified: trunk/osprey/common/targ_info/generate/isa_registers_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_registers_gen.cxx
2010-10-13 21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_registers_gen.cxx
2010-10-13 22:55:13 UTC (rev 3374)
@@ -771,4 +771,8 @@
"}\n");
Emit_Footer(hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/isa_subset_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/isa_subset_gen.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/isa_subset_gen.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -263,7 +263,7 @@
ISA_SUBSET subset = *isi;
fprintf(cfile," { /* %s */\n", subset->name);
- for ( int i = 0; i < bit_vector_sizeof; ++i ) {
+ for ( unsigned int i = 0; i < bit_vector_sizeof; ++i ) {
int members = subset->members[i];
fprintf(cfile," 0%03o, /* ",members);
for (int j = 0; j < 8; ++j) {
@@ -294,4 +294,8 @@
"}\n");
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/proc_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/proc_gen.cxx 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/generate/proc_gen.cxx 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -155,4 +155,8 @@
"}\n");
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/proc_properties_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/proc_properties_gen.cxx
2010-10-13 21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/generate/proc_properties_gen.cxx
2010-10-13 22:55:13 UTC (rev 3374)
@@ -186,8 +186,8 @@
}
}
- char *int_type;
- char *int_suffix;
+ const char *int_type;
+ const char *int_suffix;
int int_size;
if (bit_pos <= 8) {
int_type = "mUINT8";
@@ -266,4 +266,8 @@
}
Emit_Footer (hfile);
+
+ fclose(hfile);
+ fclose(cfile);
+ fclose(efile);
}
Modified: trunk/osprey/common/targ_info/generate/si_gen.cxx
===================================================================
--- trunk/osprey/common/targ_info/generate/si_gen.cxx 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/generate/si_gen.cxx 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -133,15 +133,15 @@
public:
GNAME();
// Generate a unique name. Don't care about prefix.
- GNAME(char* prefix);
+ GNAME(const char* prefix);
// Generate a unique name. Force a particular prefix.
GNAME(GNAME& other);
// Generate a name that is a copy of <other>. The name will not be unique.
// Really only useful when <other> is about to be destructed, but we still
// need to refer to it.
- char* Gname();
+ const char* Gname();
// Return the name. This is the name under which the object is defined.
- char* Addr_Of_Gname();
+ const char* Addr_Of_Gname();
// Return a pointer to the named object.
void Stub_Out();
// We've decided not to define the object after all but we may still want a
@@ -160,7 +160,7 @@
sprintf(gname,"&gname%d",count++);
}
-GNAME::GNAME(char* prefix) : stubbed(false) {
+GNAME::GNAME(const char* prefix) : stubbed(false) {
assert(strlen(prefix) <= 8);
sprintf(gname,"&%s%d",prefix,count++);
}
@@ -169,14 +169,14 @@
sprintf(gname,"%s",other.gname);
}
-char* GNAME::Gname() {
+const char* GNAME::Gname() {
if (stubbed)
return "0";
else
return gname + 1;
}
-char* GNAME::Addr_Of_Gname() {
+const char* GNAME::Addr_Of_Gname() {
if (stubbed)
return "0";
else
@@ -263,8 +263,8 @@
{
int new_inx = bit_inx + width;
- if ( use_long_longs && new_inx >= bits_per_long_long
- || !use_long_longs && new_inx >= bits_per_long
+ if ( (use_long_longs && new_inx >= bits_per_long_long)
+ || (!use_long_longs && new_inx >= bits_per_long)
) {
return false;
}
@@ -326,17 +326,17 @@
/////////////////////////////////////
public:
- RES(char *name,int count);
+ RES(const char *name,int count);
// <name> is used for documentation and debugging. <count> is the number of
// elements in the class.
static RES* Get(int id);
// Find and return the resource with the given <id>.
- char* Name() const { return name; }
+ const char* Name() const { return name; }
// Return debugging name.
- char* Addr_Of_Gname() { return gname.Addr_Of_Gname(); }
+ const char* Addr_Of_Gname() { return gname.Addr_Of_Gname(); }
// Return name of pointer to this resource object (in generated code).
unsigned int Count() const { return count; }
@@ -358,13 +358,13 @@
private:
const int count; // Available per cycle
- char* const name; // For documentation and debugging
+ const char* name; // For documentation and debugging
+ const int id; // Unique numerical identifier
GNAME gname; // Generated symbolic name
int word; // Which word in the table?
int field_width; // How wide the field?
int shift_count; // How much to shift (starting pos of the low
// order bit
- const int id; // Unique numerical identifier
static int total; // Total number of different RESs (not the the
// total of their counts, 1 for each RES)
static std::map<int,RES*> resources;
@@ -383,7 +383,7 @@
int RES::total = 0;
std::map<int,RES*> RES::resources;
-RES::RES(char *name, int count)
+RES::RES(const char *name, int count)
// constructor maintains list of all resources.
: count(count), name(name), id(total++), gname("resource")
{
@@ -489,10 +489,10 @@
void Output(FILE* fd);
// Output my definition and initialization.
- char* Addr_Of_Gname() { return gname.Addr_Of_Gname(); }
+ const char* Addr_Of_Gname() { return gname.Addr_Of_Gname(); }
// Return name of pointer to me (in generated code).
- char* Gname() { return gname.Gname(); }
+ const char* Gname() { return gname.Gname(); }
// Return my name (in generated code).
bool Compute_Maybe_Output_II_RES_REQ(int ii, FILE* fd,
@@ -518,13 +518,13 @@
// Count up all the resources of each kind that I require (in all my cycles)
// and output a definition and initialization.
- char* Res_Count_Vec_Gname() { return res_count_vec_gname.Gname(); }
+ const char* Res_Count_Vec_Gname() { return res_count_vec_gname.Gname(); }
// Return name of pointer to start of my resource count vector.
int Res_Count_Vec_Size() const { return res_count_vec_size; }
// Return length of my resource count vector.
- char* Res_Id_Set_Gname() { return res_id_set_gname.Gname(); }
+ const char* Res_Id_Set_Gname() { return res_id_set_gname.Gname(); }
// Return name of pointer to start of vector of resource id sets, one per
// cycle.
@@ -542,33 +542,28 @@
CYCLE_RES(int cycle, const RES* res) : cycle(cycle), res_id(res->Id()) {}
// Construct the <cycle,res> combination.
+ CYCLE_RES(const CYCLE_RES& rhs) : cycle(rhs.cycle), res_id(rhs.res_id) {}
+ // Copy constructor for use by STL map.
+
int Cycle() const { return cycle; }
// Return cycle component.
RES* Res() const { return RES::Get(res_id); }
// Return resource component.
- friend bool operator < (const CYCLE_RES a, const CYCLE_RES b)
+ friend bool operator < (const CYCLE_RES& a, const CYCLE_RES& b)
// Ordering for map.
- { // I didn't want to put this inline, but mongoose C++ forced me to.
- return a.cycle< b.cycle
- || a.cycle == b.cycle && a.res_id < b.res_id;
+ {
+ return (a.cycle < b.cycle)
+ || (a.cycle == b.cycle && a.res_id < b.res_id);
}
- CYCLE_RES()
- // Horrible useless required constructor required by STL map.
- : cycle(0), res_id(0)
- { // Also forced inline by mongoose C++.
- fprintf(stderr,"### Default initializer for CYCLE_RES"
- " shouldn't happen.\n");
- }
-
private:
const short cycle;
const short res_id;
};
- typedef std::map< CYCLE_RES,int,std::less <CYCLE_RES> > CYCLE_RES_COUNT_MAP;
+ typedef std::map<CYCLE_RES,int> CYCLE_RES_COUNT_MAP;
// For keeping track of the number of resources of a given type in a given
// cycle. <cycle,res> => count
@@ -742,11 +737,11 @@
/////////////////////////////////////
public:
- ISLOT(char* name, int skew, int avail_count);
+ ISLOT(const char* name, int skew, int avail_count);
// <name> is for documentation and debugging. <skew> gives a latency skew
// instructions issued in me.
- char* Addr_Of_Gname() { return gname.Addr_Of_Gname(); }
+ const char* Addr_Of_Gname() { return gname.Addr_Of_Gname(); }
// Return pointer to my name in generated.
static int Count() { return count; }
@@ -756,7 +751,7 @@
// Output all the issue slots and a vector of pointers to them all.
private:
- char* const name; // User supplied for documentation & debugging
+ const char* name; // User supplied for documentation & debugging
const int skew; // Latency skew
const int avail_count; // How many instructions can happen in it
GNAME gname; // Symbolic name in generated
@@ -767,7 +762,7 @@
std::list<ISLOT*> ISLOT::islots;
int ISLOT::count = 0;
-ISLOT::ISLOT(char* name, int skew, int avail_count)
+ISLOT::ISLOT(const char* name, int skew, int avail_count)
: name(name),
skew(skew),
avail_count(avail_count)
@@ -831,7 +826,7 @@
void Output(FILE* fd);
// Output latency vector to <fd>.
- char* Gname() { return gname.Gname(); }
+ const char* Gname() { return gname.Gname(); }
// Return name of pointer to me in generated file.
private:
@@ -915,7 +910,7 @@
public:
// These functions correspond exactly with the defined C client interface.
- INSTRUCTION_GROUP(char* name);
+ INSTRUCTION_GROUP(const char* name);
void Set_Any_Operand_Access_Time(int time);
void Set_Operand_Access_Time(int operand_index, int time);
void Set_Any_Result_Available_Time(int time);
@@ -924,35 +919,32 @@
void Set_Last_Issue_Cycle( int time );
void Set_Store_Available_Time( int time );
void Add_Resource_Requirement(const RES* res, int cycle);
-#if defined(TARG_SL)
- void Add_Alternative_Resource_Requirement(const RES*res, int cycle);
-#endif
+ void Add_Alternative_Resource_Requirement(const RES* res, int cycle);
void Add_Valid_ISLOT(ISLOT* islot);
void Set_Write_Write_Interlock();
static void Output_All(FILE* fd);
// Write them all out
- char* Addr_Of_Gname() { return gname.Addr_Of_Gname(); }
+ const char* Addr_Of_Gname() { return gname.Addr_Of_Gname(); }
// Name of pointer to me in generated file.
private:
int id; // Index in vector of same
GNAME gname; // Variable name in generated
- char* const name; // User supplied name for documentation
+ const char* name; // User supplied name for documentation
RES_REQ res_requirement; // Required to issue
-#if defined(TARG_SL)
- RES_REQ alternative_res_requirement; // alternative resource if
res_requirement can not be satisified.
-#endif
+ RES_REQ alternative_res_requirement; // Alternative resource if
+ // res_requirement cannot be satisified
- std::list<ISLOT*> valid_islots; // If there are any issue slots
at all
+ std::list<ISLOT*> valid_islots; // If there are any issue slots at all
GNAME islot_vec_gname; // Variable name of above in generated
LATENCY_INFO operand_latency_info; // When operands latch
LATENCY_INFO result_latency_info; // When results available
int load_access_time; // When loads access memory
- int last_issue_cycle; // Last issue cycle in
simulated insts
+ int last_issue_cycle; // Last issue cycle in simulated insts
int store_available_time; // When stores make value available in
// memory
@@ -990,7 +982,7 @@
std::list<INSTRUCTION_GROUP*> INSTRUCTION_GROUP::instruction_groups;
int INSTRUCTION_GROUP::count = 0;
-INSTRUCTION_GROUP::INSTRUCTION_GROUP(char* name)
+INSTRUCTION_GROUP::INSTRUCTION_GROUP(const char* name)
: id(count++),
name(name),
operand_latency_info(max_operands),
@@ -1051,7 +1043,6 @@
}
}
-#if defined(TARG_SL)
void INSTRUCTION_GROUP::Add_Alternative_Resource_Requirement(const RES* res,
int cycle)
{
if (! alternative_res_requirement.Add_Resource(res,cycle)) {
@@ -1061,7 +1052,6 @@
fprintf(stderr,"### %s at cycle %d.\n",res->Name(),cycle);
}
}
-#endif
void INSTRUCTION_GROUP::Add_Valid_ISLOT(ISLOT* islot)
{
@@ -1114,8 +1104,9 @@
}
}
- for ( i = 0; i < sizeof(bad_iis) / sizeof(bad_iis[0]); ++i ) {
- bad_iis[i] = 0ULL;
+ unsigned int j;
+ for ( j = 0; j < sizeof(bad_iis) / sizeof(bad_iis[0]); ++j ) {
+ bad_iis[j] = 0ULL;
}
for ( i = 0; i <= greatest_bad_ii; ++i ) {
@@ -1196,15 +1187,13 @@
void INSTRUCTION_GROUP::Output(FILE* fd)
{
- int i;
+ unsigned int i;
fprintf(fd,"\n/* Instruction group %s */\n",name);
res_requirement.Output(fd);
res_requirement.Compute_Output_Resource_Count_Vec(fd);
-#if defined(TARG_SL)
alternative_res_requirement.Output(fd);
alternative_res_requirement.Compute_Output_Resource_Count_Vec(fd);
-#endif
Output_II_Info(fd);
Output_Latency_Info(fd);
Output_Issue_Slot_Info(fd);
@@ -1225,10 +1214,8 @@
store_available_time);
fprintf(fd," %-15s, /* resource requirement */\n",
res_requirement.Gname());
-#if defined(TARG_SL)
- fprintf(fd, " %-15s, /* alternative resource requirement*/ \n",
- alternative_res_requirement.Gname());
-#endif
+ fprintf(fd," %-15s, /* alternative resource requirement*/\n",
+ alternative_res_requirement.Gname());
fprintf(fd," %-15s, /* res id used set vec */\n",
res_requirement.Res_Id_Set_Gname());
fprintf(fd," %-15d, /* II info size */\n",
@@ -1242,7 +1229,7 @@
fprintf(fd, "0x%" LL_FORMAT "x", bad_iis[i]);
if ( i < sizeof(bad_iis) / sizeof(bad_iis[0]) - 1 ) fprintf(fd, ",");
}
- fprintf(fd, "}} , /* Bad IIs */\n");
+ fprintf(fd, "}} , /* bad IIs */\n");
fprintf(fd," %-15d, /* valid issue slots vec size */\n",
(unsigned int) valid_islots.size());
fprintf(fd," %-15s, /* valid issue slots vec */\n",
@@ -1307,11 +1294,11 @@
// Create schedling info for the "dummy" instructions.
private:
- static std::vector<char*> top_sched_info_ptr_map; // The map itself.
+ static std::vector<const char*> top_sched_info_ptr_map; // The map itself.
static std::vector<bool> top_sched_info_defined; // Which elements defined
};
-std::vector<char*> TOP_SCHED_INFO_MAP::top_sched_info_ptr_map(TOP_count,"0");
+std::vector<const char*>
TOP_SCHED_INFO_MAP::top_sched_info_ptr_map(TOP_count,"0");
std::vector<bool> TOP_SCHED_INFO_MAP::top_sched_info_defined(TOP_count,false);
void TOP_SCHED_INFO_MAP::Create_Dummies( void )
@@ -1388,24 +1375,24 @@
static INSTRUCTION_GROUP* current_instruction_group;
/*ARGSUSED*/
-void Machine(char* name, ISA_SUBSET isa, int argc, char** argv)
+void Machine(const char* name, ISA_SUBSET isa, int argc, char** argv)
{
machine_isa = isa;
TOP_SCHED_INFO_MAP::Create_Dummies();
}
-RESOURCE RESOURCE_Create(char* name, int count)
+RESOURCE RESOURCE_Create(const char* name, int count)
{
return new RES(name,count);
}
-ISSUE_SLOT ISSUE_SLOT_Create(char* name, int skew, int count)
+ISSUE_SLOT ISSUE_SLOT_Create(const char* name, int skew, int count)
{
return new ISLOT(name,skew,count);
}
-void Instruction_Group(char* name,...)
+void Instruction_Group(const char* name,...)
{
va_list ap;
TOP opcode;
@@ -1460,12 +1447,10 @@
current_instruction_group->Add_Resource_Requirement(resource,time);
}
-#if defined(TARG_SL)
void Alternative_Resource_Requirement( RESOURCE resource, int time )
{
current_instruction_group->Add_Alternative_Resource_Requirement(resource,time);
}
-#endif
void Valid_Issue_Slot( ISSUE_SLOT slot )
{
@@ -1477,7 +1462,7 @@
current_instruction_group->Set_Write_Write_Interlock();
}
-void Machine_Done( char* filename )
+void Machine_Done( const char* filename )
{
FILE* fd = fopen(filename,"w");
// assume we won't have a target .so name with > 40 characters
Modified: trunk/osprey/common/targ_info/generate/si_gen.h
===================================================================
--- trunk/osprey/common/targ_info/generate/si_gen.h 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/generate/si_gen.h 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -224,10 +224,10 @@
typedef class RES* RESOURCE;
typedef class ISLOT* ISSUE_SLOT;
-extern void Machine( char* name, ISA_SUBSET isa, int argc, char** argv );
-extern RESOURCE RESOURCE_Create( char* name, int count );
-extern ISSUE_SLOT ISSUE_SLOT_Create( char* name, int skew, int count );
-extern void Instruction_Group( char* name, ... );
+extern void Machine( const char* name, ISA_SUBSET isa, int argc, char** argv );
+extern RESOURCE RESOURCE_Create( const char* name, int count );
+extern ISSUE_SLOT ISSUE_SLOT_Create( const char* name, int skew, int count );
+extern void Instruction_Group( const char* name, ... );
extern void Any_Operand_Access_Time( int time );
extern void Operand_Access_Time( int operand_index, int time );
extern void Any_Result_Available_Time( int time );
@@ -235,12 +235,10 @@
extern void Store_Available_Time( int time );
extern void Load_Access_Time( int time );
extern void Last_Issue_Cycle( int time );
-#if defined(TARG_SL)
-extern void Alternative_Resource_Requirement(RESOURCE resource, int time);
-#endif
+extern void Alternative_Resource_Requirement( RESOURCE resource, int time );
extern void Resource_Requirement( RESOURCE resource, int time );
extern void Valid_Issue_Slot( ISSUE_SLOT slot );
extern void Write_Write_Interlock();
-extern void Machine_Done( char* filename );
+extern void Machine_Done( const char* filename );
#endif
Modified: trunk/osprey/common/targ_info/isa/x8664/isa.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa.cxx 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa.cxx 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -71,7 +71,7 @@
#include <stddef.h>
#include "isa_gen.h"
-main ()
+int main ()
{
ISA_Create( "x8664",
@@ -3501,4 +3501,5 @@
/* END */
NULL);
+ return 0;
}
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_bundle.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_bundle.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_bundle.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -46,7 +46,7 @@
#include "topcode.h"
#include "isa_bundle_gen.h"
-main()
+int main()
{
ISA_EXEC_UNIT_TYPE
Fetch_Unit; // Instruction fetch type
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_decode.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_decode.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_decode.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -47,7 +47,7 @@
#include "isa_decode_gen.h"
#include "targ_isa_bundle.h"
-main()
+int main()
{
ISA_Decode_Begin("x8664");
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_enums.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_enums.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_enums.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -41,7 +41,7 @@
#include <stddef.h>
#include "isa_enums_gen.h"
-main ()
+int main ()
{
ISA_Enums_Begin();
@@ -54,5 +54,6 @@
NULL, UNDEFINED); // default value
ISA_Enums_End();
+ return 0;
}
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_hazards.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_hazards.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_hazards.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -59,7 +59,7 @@
#include "isa_hazards_gen.h"
-main()
+int main()
{
ISA_HAZARD
result,
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_lits.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_lits.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_lits.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -43,7 +43,7 @@
#include "isa_lits_gen.h"
-main ()
+int main ()
{
ISA_Lits_Begin();
@@ -57,4 +57,5 @@
ISA_Create_Lit_Class( "pcrel32",SIGNED, SignedBitRange(32),
LIT_RANGE_END);
ISA_Lits_End();
+ return 0;
}
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_operands.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_operands.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_operands.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -69,7 +69,7 @@
#include "topcode.h"
#include "isa_operands_gen.h"
-main()
+int main()
{
ISA_Operands_Begin("x8664");
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_pack.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_pack.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_pack.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -69,7 +69,7 @@
#include "topcode.h"
#include "isa_pack_gen.h"
-main()
+int main()
{
ISA_Pack_Begin("x8664", 32);
@@ -3415,4 +3415,5 @@
TOP_UNDEFINED);
ISA_Pack_End();
+ return 0;
}
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_print.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_print.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_print.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -84,7 +84,7 @@
// suffix starts with an underscore. To get the assembly name we strip off
// the suffix.
-main()
+int main()
{
ISA_Print_Begin("x8664");
@@ -4869,4 +4869,5 @@
TOP_UNDEFINED );
ISA_Print_End();
+ return 0;
}
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_properties.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_properties.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_properties.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -72,7 +72,7 @@
#include "topcode.h"
#include "isa_properties_gen.h"
-main()
+int main()
{
ISA_PROPERTY
move, /* Move operator */
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_pseudo.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_pseudo.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_pseudo.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -40,9 +40,10 @@
#include "topcode.h"
#include "isa_pseudo_gen.h"
-main()
+int main()
{
ISA_Pseudo_Begin("x8664");
ISA_Pseudo_End();
+ return 0;
}
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_registers.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_registers.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_registers.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -125,7 +125,7 @@
}
-main (int argc, char** argv)
+int main (int argc, char** argv)
{
ISA_Registers_Begin( "x8664" );
@@ -160,4 +160,6 @@
ISA_Register_Subclass_Create("m32_8bit_regs", rc_integer, 4, m32_8bit_regs,
NULL);
ISA_Registers_End();
+
+ return 0;
}
Modified: trunk/osprey/common/targ_info/isa/x8664/isa_subset.cxx
===================================================================
--- trunk/osprey/common/targ_info/isa/x8664/isa_subset.cxx 2010-10-13
21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/isa/x8664/isa_subset.cxx 2010-10-13
22:55:13 UTC (rev 3374)
@@ -69,7 +69,7 @@
#include "topcode.h"
#include "isa_subset_gen.h"
-main()
+int main()
{
ISA_SUBSET x86_64;
Modified: trunk/osprey/common/targ_info/proc/x8664/proc.cxx
===================================================================
--- trunk/osprey/common/targ_info/proc/x8664/proc.cxx 2010-10-13 21:12:17 UTC
(rev 3373)
+++ trunk/osprey/common/targ_info/proc/x8664/proc.cxx 2010-10-13 22:55:13 UTC
(rev 3374)
@@ -52,7 +52,7 @@
#include <stddef.h>
#include "proc_gen.h"
-main ()
+int main ()
{
PROC_Create( "x8664",
"opteron",
@@ -62,5 +62,6 @@
"core",
"wolfdale",
NULL );
+ return 0;
}
Modified: trunk/osprey/common/targ_info/proc/x8664/proc_properties.cxx
===================================================================
--- trunk/osprey/common/targ_info/proc/x8664/proc_properties.cxx
2010-10-13 21:12:17 UTC (rev 3373)
+++ trunk/osprey/common/targ_info/proc/x8664/proc_properties.cxx
2010-10-13 22:55:13 UTC (rev 3374)
@@ -57,7 +57,7 @@
#include "targ_proc.h"
#include "proc_properties_gen.h"
-main()
+int main()
{
PROC_PROPERTY
branch_delay_slot, /* branch delay slot */
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel