* src/SDCCicode.c (isOperandEqual): fixed bug
1198642
* src/SDCCcse.c (findPrevIc): added comment, please have a look
* support/scripts/resource.h,
* support/scripts/resource.rc,
* src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
* support/scripts/sdcc.ico: added 32x32 icon
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3766
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * support/regression/tests/bug1198642.c: new test
+ * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
+ * src/SDCCcse.c (findPrevIc): added comment, please have a look
+ * support/scripts/resource.h,
+ * support/scripts/resource.rc,
+ * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
+ * support/scripts/sdcc.ico: added 32x32 icon
+
2005-05-18 Raphael Neider <rneider AT web.de>
* device/lib/pic16/libdev/pic18f*.c,
* device/include/mcs51/8052.h: made parseable with lint
* device/include/mcs51/lint.h: added include file for (sp)lint
* doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
- * doc/cdbfileformat.lyx,
+ * doc/cdbfileformat.lyx,
* doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2005-05-14 Raphael Neider <rneider AT web.de>
/* if iCodes are not the same */
/* see the operands maybe interchanged */
if (ic->op == cdp->diCode->op &&
- (ic->op == '+' || ic->op == '*') &&
+ (ic->op == '+' || ic->op == '*') && // MB: why not check for &, &&, |, ||, ^ ???
isOperandEqual (IC_LEFT (ic), IC_RIGHT (cdp->diCode)) &&
isOperandEqual (IC_RIGHT (ic), IC_LEFT (cdp->diCode)))
{
return isSymbolEqual (left->operand.symOperand,
right->operand.symOperand);
case VALUE:
- return (floatFromVal (left->operand.valOperand) ==
- floatFromVal (right->operand.valOperand));
+ return (compareType (left->operand.valOperand->type,
+ right->operand.valOperand->type) &&
+ (floatFromVal (left->operand.valOperand) ==
+ floatFromVal (right->operand.valOperand)))
case TYPE:
if (compareType (left->operand.typeOperand,
right->operand.typeOperand) == 1)
# End Source File
# Begin Source File
+SOURCE=..\support\scripts\resource.rc
+# End Source File
+# Begin Source File
+
SOURCE=.\SDCC.lex
!IF "$(CFG)" == "src - Win32 Debug"
--- /dev/null
+/*
+ bug1198642.c
+*/
+
+#include <testfwk.h>
+
+void
+test_cse_generic_ptr(void)
+{
+#if defined(SDCC_mcs51)
+ volatile void *p1;
+ volatile void *p2;
+
+ p1 = (data char *)1;
+ p2 = (idata char *)1;
+ ASSERT (p1 == p2);
+
+ p1 = (data char *)1;
+ p2 = (xdata char *)1;
+ ASSERT (p1 != p2);
+
+ p1 = (data char *)1;
+ p2 = (idata char *)2;
+ ASSERT (p1 != p2);
+#endif
+}
--- /dev/null
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by resource.rc
+//
+#define IDI_SDCC 101
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
--- /dev/null
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_SDCC ICON DISCARDABLE "sdcc.ico"
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+