Skip to content

Commit

Permalink
issue #169 Update MIR sources - includes a memory leak bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyendumajumdar committed Jan 7, 2021
1 parent def4d76 commit 773ebd9
Show file tree
Hide file tree
Showing 66 changed files with 131 additions and 106 deletions.
2 changes: 2 additions & 0 deletions mir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ project. Following changes have been made:

* A CMake build script added to create a library
* Unused files / tests have been removed to avoid clutter

Last update: 7th Jan 2021
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/caarch64-ABI-code.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
aarch64 call ABI target specific code.
*/

Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/caarch64-code.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#include "../mirc.h"
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/caarch64.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/mirc_aarch64_float.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 5.2.4.2.2 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/mirc_aarch64_limits.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See 5.2.4.2 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/mirc_aarch64_linux.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static char aarch64_mirc[]
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/mirc_aarch64_stdarg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static char stdarg_str[]
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/mirc_aarch64_stddef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.19 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/aarch64/mirc_aarch64_stdint.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.20 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/c2mir.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* C to MIR compiler. It is a four pass compiler:
Expand Down
4 changes: 4 additions & 0 deletions mir/c2mir/c2mir.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This file is a part of MIR project.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#ifndef C2MIR_H

#define C2MIR_H
Expand Down
4 changes: 4 additions & 0 deletions mir/c2mir/mirc.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This file is a part of MIR project.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static const char mirc[]
= "#define __mirc__ 1\n"
"#define __MIRC__ 1\n"
Expand Down
4 changes: 4 additions & 0 deletions mir/c2mir/mirc_iso646.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This file is a part of MIR project.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.9 */
static char iso646_str[]
= "#ifndef __ISO646_H\n"
Expand Down
4 changes: 4 additions & 0 deletions mir/c2mir/mirc_stdalign.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This file is a part of MIR project.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.15 */
static char stdalign_str[]
= "#ifndef __STDALIGN_H\n"
Expand Down
4 changes: 4 additions & 0 deletions mir/c2mir/mirc_stdbool.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This file is a part of MIR project.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.18 */
static char stdbool_str[]
= "#ifndef __STDBOOL_H\n"
Expand Down
4 changes: 4 additions & 0 deletions mir/c2mir/mirc_stdnoreturn.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* This file is a part of MIR project.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.23 */
static char stdnoreturn_str[]
= "#ifndef __STDNORETURN_H\n"
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/ppc64/cppc64-ABI-code.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
ppc64 call ABI target specific code.
*/

Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/ppc64/cppc64-code.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#include "../mirc.h"
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/ppc64/cppc64.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/ppc64/mirc_ppc64_float.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 5.2.4.2.2 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/ppc64/mirc_ppc64_limits.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See 5.2.4.2 */
Expand Down
4 changes: 2 additions & 2 deletions mir/c2mir/ppc64/mirc_ppc64_linux.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static char ppc64_mirc[]
Expand All @@ -15,7 +15,7 @@ static char ppc64_mirc[]
"#define _CALL_ELF 2\n"
#endif
"\n"
"#define __LONG_DOUBLE_128__ 1\n" // ???
"#define __LONG_DOUBLE_128__ 1\n" // ???
"#define __SIZEOF_DOUBLE__ 8\n"
"#define __SIZEOF_FLOAT__ 4\n"
"#define __SIZEOF_INT__ 4\n"
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/ppc64/mirc_ppc64_stdarg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static char stdarg_str[]
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/ppc64/mirc_ppc64_stddef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.19 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/ppc64/mirc_ppc64_stdint.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.20 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/s390x/cs390x-ABI-code.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
s390x call ABI target specific code.
*/

Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/s390x/cs390x-code.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#include "../mirc.h"
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/s390x/cs390x.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/s390x/mirc_s390x_float.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 5.2.4.2.2 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/s390x/mirc_s390x_limits.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See 5.2.4.2 */
Expand Down
4 changes: 2 additions & 2 deletions mir/c2mir/s390x/mirc_s390x_linux.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static char s390x_mirc[]
Expand All @@ -11,7 +11,7 @@ static char s390x_mirc[]
"#define __ELF__ 1\n"
"\n"
#if __SIZEOF_LONG_DOUBLE__ == 16
"#define __LONG_DOUBLE_128__ 1\n" // ???
"#define __LONG_DOUBLE_128__ 1\n" // ???
"#define __SIZEOF_LONG_DOUBLE__ 16\n"
#else
"#define __SIZEOF_LONG_DOUBLE__ 8\n"
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/s390x/mirc_s390x_stdarg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static char stdarg_str[]
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/s390x/mirc_s390x_stddef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.19 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/s390x/mirc_s390x_stdint.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2020-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.20 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/cx86_64-ABI-code.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
x86_64 ABI target specific code.
*/

Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/cx86_64-code.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#include "../mirc.h"
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/cx86_64.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/mirc_x86_64_float.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2019-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2019-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 5.2.4.2.2 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/mirc_x86_64_limits.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2019-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2019-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See 5.2.4.2 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/mirc_x86_64_linux.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2019-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2019-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static char x86_64_mirc[]
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/mirc_x86_64_stdarg.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2019-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2019-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.16 and https://www.uclibc.org/docs/psABI-x86_64.pdf */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/mirc_x86_64_stddef.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2019-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2019-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.19 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/mirc_x86_64_stdint.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2019-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2019-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* See C11 7.20 */
Expand Down
2 changes: 1 addition & 1 deletion mir/c2mir/x86_64/mirc_x86_64_win.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2019-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2019-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

static char x86_64_mirc[]
Expand Down
2 changes: 1 addition & 1 deletion mir/mir-aarch64.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#define VA_LIST_IS_ARRAY_P 0
Expand Down
2 changes: 1 addition & 1 deletion mir/mir-bitmap.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is a part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

#ifndef MIR_BITMAP_H
Expand Down
2 changes: 1 addition & 1 deletion mir/mir-dlist.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This file is part of MIR project.
Copyright (C) 2018-2020 Vladimir Makarov <vmakarov.gcc@gmail.com>.
Copyright (C) 2018-2021 Vladimir Makarov <vmakarov.gcc@gmail.com>.
*/

/* Typed doubly linked lists. */
Expand Down
Loading

0 comments on commit 773ebd9

Please sign in to comment.