Changeset 617
- Timestamp:
- Aug 16, 2003, 10:07:31 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/src/gcc/gcc/config/i386/i386.c (modified) (5 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gcc/gcc/config/i386/i386.c
-
Property cvs2svn:cvs-rev
changed from
1.8to1.9
r616 r617 1297 1297 }; 1298 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1299 1328 /* Check if we don't have incompatible calling conversion attributes */ 1300 1329 int … … 1324 1353 1325 1354 for (i = 0; ix86_attribute_table [i].name; i++) 1326 if (lookup_attribute (ix86_attribute_table [i].name, TYPE_ATTRIBUTES (type))) 1355 if ((ix86_attribute_codes [i] & IX86_ATTR_TYPE_CALLCONV) 1356 && lookup_attribute (ix86_attribute_table [i].name, TYPE_ATTRIBUTES (type))) 1327 1357 { 1328 1358 /* Warn if we have another calling convention attribute and it is … … 1526 1556 tree type2; 1527 1557 { 1528 unsigned i; 1529 unsigned char cc1 = 0, cc2 = 0; 1530 /* WARNING! Keep in sync with ix86_attribute_table!!! */ 1531 unsigned char attrcode [] = 1532 { 1533 0x10, // stdcall 1534 0x20, // cdecl 1535 0x30, // regparm 1536 #ifdef TARGET_DLLIMPORT_DECL_ATTRIBUTES 1537 0x40, // dllimport 1538 0x50, // dllexport 1539 0x60, // shared 1540 #endif 1541 #ifdef TARGET_SYSTEM_DECL_ATTRIBUTES 1542 0x21, // system is compatible with cdecl 1543 #endif 1544 #ifdef TARGET_OPTLINK_DECL_ATTRIBUTES 1545 0x70, // optlink 1546 #endif 1547 }; 1558 unsigned i, cc1 = 0, cc2 = 0; 1548 1559 1549 1560 /* The following calling conventions have meaning only for functions */ … … 1560 1571 1561 1572 for (i = 0; ix86_attribute_table [i].name; i++) 1562 { 1563 if (lookup_attribute (ix86_attribute_table [i].name, TYPE_ATTRIBUTES (type1))) 1564 cc1 = attrcode [i]; 1565 if (lookup_attribute (ix86_attribute_table [i].name, TYPE_ATTRIBUTES (type2))) 1566 cc2 = attrcode [i]; 1567 } 1573 if (ix86_attribute_codes [i] & IX86_ATTR_TYPE_CALLCONV) 1574 { 1575 if (lookup_attribute (ix86_attribute_table [i].name, TYPE_ATTRIBUTES (type1))) 1576 cc1 = ix86_attribute_codes [i]; 1577 if (lookup_attribute (ix86_attribute_table [i].name, TYPE_ATTRIBUTES (type2))) 1578 cc2 = ix86_attribute_codes [i]; 1579 } 1568 1580 1569 1581 if (!cc1) 1570 cc1 = TARGET_RTD ? 0x10 : 0x20;1582 cc1 = ; 1571 1583 if (!cc2) 1572 cc2 = TARGET_RTD ? 0x10 : 0x20;1584 cc2 = ; 1573 1585 1574 1586 /* If calling conventions are the same, its okay */ … … 1577 1589 1578 1590 /* If they are not compatible, return 0 */ 1579 if ((cc1 ^ cc2) & 0xf0)1591 if ((cc1 ^ cc2) & ) 1580 1592 return 0; 1581 1593 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
