Add moxie support. Release 3.0.12.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781
diff --git a/ChangeLog b/ChangeLog
index 74d529e..92c1a15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2013-02-11 Anthony Green <green@moxielogic.com>
+
+ * configure.ac: Update release number to 3.0.12.
+ * configure: Rebuilt.
+ * README: Update release info.
+
+2013-02-10 Anthony Green <green@moxielogic.com>
+
+ * README: Add Moxie.
+ * src/moxie/ffi.c: Created.
+ * src/moxie/eabi.S: Created.
+ * src/moxie/ffitarget.h: Created.
+ * Makefile.am (nodist_libffi_la_SOURCES): Add Moxie.
+ * Makefile.in: Rebuilt.
+ * configure.ac: Add Moxie.
+ * configure: Rebuilt.
+ * testsuite/libffi.call/huge_struct.c: Disable format string
+ warnings for moxie*-*-elf tests.
+
+2013-02-10 Anthony Green <green@moxielogic.com>
+
+ * Makefile.am (LTLDFLAGS): Fix reference.
+ * Makefile.in: Rebuilt.
+
2013-02-10 Anthony Green <green@moxielogic.com>
* README: Update supported platforms. Update test results link.
diff --git a/Makefile.am b/Makefile.am
index 5787f9e..8f1362a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -148,6 +148,9 @@ endif
if M68K
nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
endif
+if MOXIE
+nodist_libffi_la_SOURCES += src/moxie/ffi.c src/moxie/eabi.S
+endif
if MICROBLAZE
nodist_libffi_la_SOURCES += src/microblaze/ffi.c src/microblaze/sysv.S
endif
@@ -209,7 +212,7 @@ endif
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
-LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
+LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS))
libffi_la_LDFLAGS = -no-undefined -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
diff --git a/Makefile.in b/Makefile.in
index 7317ec1..fc5e80e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -65,25 +65,26 @@ target_triplet = @target@
@IA64_TRUE@am__append_11 = src/ia64/ffi.c src/ia64/unix.S
@M32R_TRUE@am__append_12 = src/m32r/sysv.S src/m32r/ffi.c
@M68K_TRUE@am__append_13 = src/m68k/ffi.c src/m68k/sysv.S
-@MICROBLAZE_TRUE@am__append_14 = src/microblaze/ffi.c src/microblaze/sysv.S
-@POWERPC_TRUE@am__append_15 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
-@POWERPC_AIX_TRUE@am__append_16 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
-@POWERPC_DARWIN_TRUE@am__append_17 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
-@POWERPC_FREEBSD_TRUE@am__append_18 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
-@AARCH64_TRUE@am__append_19 = src/aarch64/sysv.S src/aarch64/ffi.c
-@ARM_TRUE@am__append_20 = src/arm/sysv.S src/arm/ffi.c
-@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__append_21 = src/arm/trampoline.S
-@AVR32_TRUE@am__append_22 = src/avr32/sysv.S src/avr32/ffi.c
-@LIBFFI_CRIS_TRUE@am__append_23 = src/cris/sysv.S src/cris/ffi.c
-@FRV_TRUE@am__append_24 = src/frv/eabi.S src/frv/ffi.c
-@S390_TRUE@am__append_25 = src/s390/sysv.S src/s390/ffi.c
-@X86_64_TRUE@am__append_26 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
-@SH_TRUE@am__append_27 = src/sh/sysv.S src/sh/ffi.c
-@SH64_TRUE@am__append_28 = src/sh64/sysv.S src/sh64/ffi.c
-@PA_LINUX_TRUE@am__append_29 = src/pa/linux.S src/pa/ffi.c
-@PA_HPUX_TRUE@am__append_30 = src/pa/hpux32.S src/pa/ffi.c
-@TILE_TRUE@am__append_31 = src/tile/tile.S src/tile/ffi.c
-@XTENSA_TRUE@am__append_32 = src/xtensa/sysv.S src/xtensa/ffi.c
+@MOXIE_TRUE@am__append_14 = src/moxie/ffi.c src/moxie/eabi.S
+@MICROBLAZE_TRUE@am__append_15 = src/microblaze/ffi.c src/microblaze/sysv.S
+@POWERPC_TRUE@am__append_16 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
+@POWERPC_AIX_TRUE@am__append_17 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
+@POWERPC_DARWIN_TRUE@am__append_18 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
+@POWERPC_FREEBSD_TRUE@am__append_19 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
+@AARCH64_TRUE@am__append_20 = src/aarch64/sysv.S src/aarch64/ffi.c
+@ARM_TRUE@am__append_21 = src/arm/sysv.S src/arm/ffi.c
+@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__append_22 = src/arm/trampoline.S
+@AVR32_TRUE@am__append_23 = src/avr32/sysv.S src/avr32/ffi.c
+@LIBFFI_CRIS_TRUE@am__append_24 = src/cris/sysv.S src/cris/ffi.c
+@FRV_TRUE@am__append_25 = src/frv/eabi.S src/frv/ffi.c
+@S390_TRUE@am__append_26 = src/s390/sysv.S src/s390/ffi.c
+@X86_64_TRUE@am__append_27 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
+@SH_TRUE@am__append_28 = src/sh/sysv.S src/sh/ffi.c
+@SH64_TRUE@am__append_29 = src/sh64/sysv.S src/sh64/ffi.c
+@PA_LINUX_TRUE@am__append_30 = src/pa/linux.S src/pa/ffi.c
+@PA_HPUX_TRUE@am__append_31 = src/pa/hpux32.S src/pa/ffi.c
+@TILE_TRUE@am__append_32 = src/tile/tile.S src/tile/ffi.c
+@XTENSA_TRUE@am__append_33 = src/xtensa/sysv.S src/xtensa/ffi.c
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/doc/stamp-vti \
@@ -164,36 +165,37 @@ am_libffi_la_OBJECTS = src/prep_cif.lo src/types.lo src/raw_api.lo \
@IA64_TRUE@am__objects_11 = src/ia64/ffi.lo src/ia64/unix.lo
@M32R_TRUE@am__objects_12 = src/m32r/sysv.lo src/m32r/ffi.lo
@M68K_TRUE@am__objects_13 = src/m68k/ffi.lo src/m68k/sysv.lo
-@MICROBLAZE_TRUE@am__objects_14 = src/microblaze/ffi.lo \
+@MOXIE_TRUE@am__objects_14 = src/moxie/ffi.lo src/moxie/eabi.lo
+@MICROBLAZE_TRUE@am__objects_15 = src/microblaze/ffi.lo \
@MICROBLAZE_TRUE@ src/microblaze/sysv.lo
-@POWERPC_TRUE@am__objects_15 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
+@POWERPC_TRUE@am__objects_16 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
@POWERPC_TRUE@ src/powerpc/ppc_closure.lo \
@POWERPC_TRUE@ src/powerpc/linux64.lo \
@POWERPC_TRUE@ src/powerpc/linux64_closure.lo
-@POWERPC_AIX_TRUE@am__objects_16 = src/powerpc/ffi_darwin.lo \
+@POWERPC_AIX_TRUE@am__objects_17 = src/powerpc/ffi_darwin.lo \
@POWERPC_AIX_TRUE@ src/powerpc/aix.lo \
@POWERPC_AIX_TRUE@ src/powerpc/aix_closure.lo
-@POWERPC_DARWIN_TRUE@am__objects_17 = src/powerpc/ffi_darwin.lo \
+@POWERPC_DARWIN_TRUE@am__objects_18 = src/powerpc/ffi_darwin.lo \
@POWERPC_DARWIN_TRUE@ src/powerpc/darwin.lo \
@POWERPC_DARWIN_TRUE@ src/powerpc/darwin_closure.lo
-@POWERPC_FREEBSD_TRUE@am__objects_18 = src/powerpc/ffi.lo \
+@POWERPC_FREEBSD_TRUE@am__objects_19 = src/powerpc/ffi.lo \
@POWERPC_FREEBSD_TRUE@ src/powerpc/sysv.lo \
@POWERPC_FREEBSD_TRUE@ src/powerpc/ppc_closure.lo
-@AARCH64_TRUE@am__objects_19 = src/aarch64/sysv.lo src/aarch64/ffi.lo
-@ARM_TRUE@am__objects_20 = src/arm/sysv.lo src/arm/ffi.lo
-@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__objects_21 = src/arm/trampoline.lo
-@AVR32_TRUE@am__objects_22 = src/avr32/sysv.lo src/avr32/ffi.lo
-@LIBFFI_CRIS_TRUE@am__objects_23 = src/cris/sysv.lo src/cris/ffi.lo
-@FRV_TRUE@am__objects_24 = src/frv/eabi.lo src/frv/ffi.lo
-@S390_TRUE@am__objects_25 = src/s390/sysv.lo src/s390/ffi.lo
-@X86_64_TRUE@am__objects_26 = src/x86/ffi64.lo src/x86/unix64.lo \
+@AARCH64_TRUE@am__objects_20 = src/aarch64/sysv.lo src/aarch64/ffi.lo
+@ARM_TRUE@am__objects_21 = src/arm/sysv.lo src/arm/ffi.lo
+@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__objects_22 = src/arm/trampoline.lo
+@AVR32_TRUE@am__objects_23 = src/avr32/sysv.lo src/avr32/ffi.lo
+@LIBFFI_CRIS_TRUE@am__objects_24 = src/cris/sysv.lo src/cris/ffi.lo
+@FRV_TRUE@am__objects_25 = src/frv/eabi.lo src/frv/ffi.lo
+@S390_TRUE@am__objects_26 = src/s390/sysv.lo src/s390/ffi.lo
+@X86_64_TRUE@am__objects_27 = src/x86/ffi64.lo src/x86/unix64.lo \
@X86_64_TRUE@ src/x86/ffi.lo src/x86/sysv.lo
-@SH_TRUE@am__objects_27 = src/sh/sysv.lo src/sh/ffi.lo
-@SH64_TRUE@am__objects_28 = src/sh64/sysv.lo src/sh64/ffi.lo
-@PA_LINUX_TRUE@am__objects_29 = src/pa/linux.lo src/pa/ffi.lo
-@PA_HPUX_TRUE@am__objects_30 = src/pa/hpux32.lo src/pa/ffi.lo
-@TILE_TRUE@am__objects_31 = src/tile/tile.lo src/tile/ffi.lo
-@XTENSA_TRUE@am__objects_32 = src/xtensa/sysv.lo src/xtensa/ffi.lo
+@SH_TRUE@am__objects_28 = src/sh/sysv.lo src/sh/ffi.lo
+@SH64_TRUE@am__objects_29 = src/sh64/sysv.lo src/sh64/ffi.lo
+@PA_LINUX_TRUE@am__objects_30 = src/pa/linux.lo src/pa/ffi.lo
+@PA_HPUX_TRUE@am__objects_31 = src/pa/hpux32.lo src/pa/ffi.lo
+@TILE_TRUE@am__objects_32 = src/tile/tile.lo src/tile/ffi.lo
+@XTENSA_TRUE@am__objects_33 = src/xtensa/sysv.lo src/xtensa/ffi.lo
nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
$(am__objects_3) $(am__objects_4) $(am__objects_5) \
$(am__objects_6) $(am__objects_7) $(am__objects_8) \
@@ -204,17 +206,18 @@ nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
$(am__objects_21) $(am__objects_22) $(am__objects_23) \
$(am__objects_24) $(am__objects_25) $(am__objects_26) \
$(am__objects_27) $(am__objects_28) $(am__objects_29) \
- $(am__objects_30) $(am__objects_31) $(am__objects_32)
+ $(am__objects_30) $(am__objects_31) $(am__objects_32) \
+ $(am__objects_33)
libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \
$(nodist_libffi_la_OBJECTS)
libffi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libffi_la_LDFLAGS) $(LDFLAGS) -o $@
libffi_convenience_la_LIBADD =
-am__objects_33 = src/prep_cif.lo src/types.lo src/raw_api.lo \
+am__objects_34 = src/prep_cif.lo src/types.lo src/raw_api.lo \
src/java_raw_api.lo src/closures.lo
-am_libffi_convenience_la_OBJECTS = $(am__objects_33)
-am__objects_34 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+am_libffi_convenience_la_OBJECTS = $(am__objects_34)
+am__objects_35 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
$(am__objects_4) $(am__objects_5) $(am__objects_6) \
$(am__objects_7) $(am__objects_8) $(am__objects_9) \
$(am__objects_10) $(am__objects_11) $(am__objects_12) \
@@ -224,8 +227,8 @@ am__objects_34 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
$(am__objects_22) $(am__objects_23) $(am__objects_24) \
$(am__objects_25) $(am__objects_26) $(am__objects_27) \
$(am__objects_28) $(am__objects_29) $(am__objects_30) \
- $(am__objects_31) $(am__objects_32)
-nodist_libffi_convenience_la_OBJECTS = $(am__objects_34)
+ $(am__objects_31) $(am__objects_32) $(am__objects_33)
+nodist_libffi_convenience_la_OBJECTS = $(am__objects_35)
libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \
$(nodist_libffi_convenience_la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
@@ -563,10 +566,11 @@ nodist_libffi_la_SOURCES = $(am__append_1) $(am__append_2) \
$(am__append_21) $(am__append_22) $(am__append_23) \
$(am__append_24) $(am__append_25) $(am__append_26) \
$(am__append_27) $(am__append_28) $(am__append_29) \
- $(am__append_30) $(am__append_31) $(am__append_32)
+ $(am__append_30) $(am__append_31) $(am__append_32) \
+ $(am__append_33)
libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
-LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
+LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS))
libffi_la_LDFLAGS = -no-undefined -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
AM_CCASFLAGS = $(AM_CPPFLAGS)
@@ -779,6 +783,16 @@ src/m68k/ffi.lo: src/m68k/$(am__dirstamp) \
src/m68k/$(DEPDIR)/$(am__dirstamp)
src/m68k/sysv.lo: src/m68k/$(am__dirstamp) \
src/m68k/$(DEPDIR)/$(am__dirstamp)
+src/moxie/$(am__dirstamp):
+ @$(MKDIR_P) src/moxie
+ @: > src/moxie/$(am__dirstamp)
+src/moxie/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/moxie/$(DEPDIR)
+ @: > src/moxie/$(DEPDIR)/$(am__dirstamp)
+src/moxie/ffi.lo: src/moxie/$(am__dirstamp) \
+ src/moxie/$(DEPDIR)/$(am__dirstamp)
+src/moxie/eabi.lo: src/moxie/$(am__dirstamp) \
+ src/moxie/$(DEPDIR)/$(am__dirstamp)
src/microblaze/$(am__dirstamp):
@$(MKDIR_P) src/microblaze
@: > src/microblaze/$(am__dirstamp)
@@ -962,6 +976,8 @@ mostlyclean-compile:
-rm -f src/microblaze/*.lo
-rm -f src/mips/*.$(OBJEXT)
-rm -f src/mips/*.lo
+ -rm -f src/moxie/*.$(OBJEXT)
+ -rm -f src/moxie/*.lo
-rm -f src/pa/*.$(OBJEXT)
-rm -f src/pa/*.lo
-rm -f src/powerpc/*.$(OBJEXT)
@@ -1016,6 +1032,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/n32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/mips/$(DEPDIR)/o32.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/moxie/$(DEPDIR)/eabi.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/moxie/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/ffi.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/hpux32.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/pa/$(DEPDIR)/linux.Plo@am__quote@
@@ -1118,6 +1136,7 @@ clean-libtool:
-rm -rf src/m68k/.libs src/m68k/_libs
-rm -rf src/microblaze/.libs src/microblaze/_libs
-rm -rf src/mips/.libs src/mips/_libs
+ -rm -rf src/moxie/.libs src/moxie/_libs
-rm -rf src/pa/.libs src/pa/_libs
-rm -rf src/powerpc/.libs src/powerpc/_libs
-rm -rf src/s390/.libs src/s390/_libs
@@ -1696,6 +1715,8 @@ distclean-generic:
-rm -f src/microblaze/$(am__dirstamp)
-rm -f src/mips/$(DEPDIR)/$(am__dirstamp)
-rm -f src/mips/$(am__dirstamp)
+ -rm -f src/moxie/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/moxie/$(am__dirstamp)
-rm -f src/pa/$(DEPDIR)/$(am__dirstamp)
-rm -f src/pa/$(am__dirstamp)
-rm -f src/powerpc/$(DEPDIR)/$(am__dirstamp)
@@ -1726,7 +1747,7 @@ clean-am: clean-aminfo clean-generic clean-libtool \
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
+ -rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
@@ -1865,7 +1886,7 @@ installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
- -rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
+ -rm -rf src/$(DEPDIR) src/aarch64/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/avr32/$(DEPDIR) src/bfin/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/microblaze/$(DEPDIR) src/mips/$(DEPDIR) src/moxie/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/tile/$(DEPDIR) src/x86/$(DEPDIR) src/xtensa/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti
diff --git a/README b/README
index f5abd43..82b2104 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
Status
======
-libffi-3.0.12 was released on XXXXXXX. Check the libffi web page for
-updates: <URL:http://sourceware.org/libffi/>.
+libffi-3.0.12 was released on February 11, 2013. Check the libffi web
+page for updates: <URL:http://sourceware.org/libffi/>.
What is libffi?
@@ -68,6 +68,7 @@ tested:
| MIPS | Linux | GCC |
| MIPS | RTEMS | GCC |
| MIPS64 | Linux | GCC |
+| Moxie | Bare metal | GCC
| PowerPC 32-bit | AIX | IBM XL C |
| PowerPC 64-bit | AIX | IBM XL C |
| PowerPC | AMIGA | GCC |
@@ -161,11 +162,12 @@ History
See the ChangeLog files for details.
-3.0.12 XXX-XX-XX
+3.0.12 Feb-11-13
+ Add Moxie support.
Add AArch64 support.
Add Blackfin support.
Add TILE-Gx/TILEPro support.
- Add Microblaze support.
+ Add MicroBlaze support.
Add Xtensa support.
Add support for PaX enabled kernels with MPROTECT.
Add support for native vendor compilers on
@@ -353,6 +355,7 @@ m68k Andreas Schwab
microblaze Nathan Rossi
mips Anthony Green, Casey Marshall
mips64 David Daney
+moxie Anthony Green
pa Randolph Chung, Dave Anglin, Andreas Tobler
powerpc Geoffrey Keating, Andreas Tobler,
David Edelsohn, John Hornkvist
diff --git a/configure b/configure
index 771398a..a3a2a82 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libffi 3.0.12-rc3.
+# Generated by GNU Autoconf 2.69 for libffi 3.0.12.
#
# Report bugs to <http://github.com/atgreen/libffi/issues>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libffi'
PACKAGE_TARNAME='libffi'
-PACKAGE_VERSION='3.0.12-rc3'
-PACKAGE_STRING='libffi 3.0.12-rc3'
+PACKAGE_VERSION='3.0.12'
+PACKAGE_STRING='libffi 3.0.12'
PACKAGE_BUGREPORT='http://github.com/atgreen/libffi/issues'
PACKAGE_URL=''
@@ -1405,7 +1405,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libffi 3.0.12-rc3 to adapt to many kinds of systems.
+\`configure' configures libffi 3.0.12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1476,7 +1476,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libffi 3.0.12-rc3:";;
+ short | recursive ) echo "Configuration of libffi 3.0.12:";;
esac
cat <<\_ACEOF
@@ -1596,7 +1596,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libffi configure 3.0.12-rc3
+libffi configure 3.0.12
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2202,7 +2202,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libffi $as_me 3.0.12-rc3, which was
+It was created by libffi $as_me 3.0.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3245,7 +3245,7 @@ fi
# Define the identity of the package.
PACKAGE='libffi'
- VERSION='3.0.12-rc3'
+ VERSION='3.0.12'
cat >>confdefs.h <<_ACEOF
@@ -13415,6 +13415,10 @@ case "$host" in
TARGET=MICROBLAZE; TARGETDIR=microblaze
;;
+ moxie-*-*)
+ TARGET=MOXIE; TARGETDIR=moxie
+ ;;
+
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
TARGET=MIPS; TARGETDIR=mips
;;
@@ -15527,7 +15531,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libffi $as_me 3.0.12-rc3, which was
+This file was extended by libffi $as_me 3.0.12, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15597,7 +15601,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libffi config.status 3.0.12-rc3
+libffi config.status 3.0.12
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index c3cd132..428d938 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
AC_PREREQ(2.68)
-AC_INIT([libffi], [3.0.12-rc3], [http://github.com/atgreen/libffi/issues])
+AC_INIT([libffi], [3.0.12], [http://github.com/atgreen/libffi/issues])
AC_CONFIG_HEADERS([fficonfig.h])
AC_CANONICAL_SYSTEM
@@ -195,6 +195,10 @@ case "$host" in
TARGET=MICROBLAZE; TARGETDIR=microblaze
;;
+ moxie-*-*)
+ TARGET=MOXIE; TARGETDIR=moxie
+ ;;
+
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
TARGET=MIPS; TARGETDIR=mips
;;
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 883a8ff..766fbac 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
@set UPDATED 6 February 2013
@set UPDATED-MONTH February 2013
-@set EDITION 3.0.12-rc3
-@set VERSION 3.0.12-rc3
+@set EDITION 3.0.12
+@set VERSION 3.0.12
diff --git a/doc/version.texi b/doc/version.texi
index 883a8ff..766fbac 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
@set UPDATED 6 February 2013
@set UPDATED-MONTH February 2013
-@set EDITION 3.0.12-rc3
-@set VERSION 3.0.12-rc3
+@set EDITION 3.0.12
+@set VERSION 3.0.12
diff --git a/src/moxie/eabi.S b/src/moxie/eabi.S
index 7e2143b..ac7aceb 100644
--- a/src/moxie/eabi.S
+++ b/src/moxie/eabi.S
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
- eabi.S - Copyright (c) 2012 Anthony Green
+ eabi.S - Copyright (c) 2012, 2013 Anthony Green
Moxie Assembly glue.
@@ -41,24 +41,61 @@
# $r4 : ecif.rvalue
# $r5 : fn
-ffi_call_EABI:
+ffi_call_EABI:
+ push $sp, $r6
+ push $sp, $r7
+ push $sp, $r8
dec $sp, 24
/* Store incoming args on stack. */
- sto.l 0($sp), $r0
- sto.l 4($sp), $r1
- sto.l 8($sp), $r2
- sto.l 12($sp), $r3
- sto.l 16($sp), $r4
- sto.l 20($sp), $r5
+ sto.l 0($sp), $r0 /* ffi_prep_args */
+ sto.l 4($sp), $r1 /* ecif */
+ sto.l 8($sp), $r2 /* bytes */
+ sto.l 12($sp), $r3 /* flags */
+ sto.l 16($sp), $r4 /* &rvalue */
+ sto.l 20($sp), $r5 /* fn */
/* Call ffi_prep_args. */
- jsr $r0
+ mov $r6, $r4 /* Save result buffer */
+ mov $r7, $r5 /* Save the target fn */
+ mov $r8, $r3 /* Save the flags */
+ sub.l $sp, $r2 /* Allocate stack space */
+ mov $r0, $sp /* We can stomp over $r0 */
+ /* $r1 is already set up */
+ jsra ffi_prep_args
+ /* Load register arguments. */
+ ldo.l $r0, 0($sp)
+ ldo.l $r1, 4($sp)
+ ldo.l $r2, 8($sp)
+ ldo.l $r3, 12($sp)
+ ldo.l $r4, 16($sp)
+ ldo.l $r5, 20($sp)
+
/* Call the target function. */
- jsr $r5
+ jsr $r7
+
+ ldi.l $r7, 0xffffffff
+ cmp $r8, $r7
+ beq retstruct
+
+ ldi.l $r7, 4
+ cmp $r8, $r7
+ bgt ret2reg
+
+ st.l ($r6), $r0
+ jmpa retdone
+
+ret2reg:
+ st.l ($r6), $r0
+ sto.l 4($r6), $r1
+retstruct:
+retdone:
/* Return. */
+ ldo.l $r6, -4($fp)
+ ldo.l $r7, -8($fp)
+ ldo.l $r8, -12($fp)
ret
.size ffi_call_EABI, .-ffi_call_EABI
diff --git a/src/moxie/ffi.c b/src/moxie/ffi.c
index 11abb00..540a042 100644
--- a/src/moxie/ffi.c
+++ b/src/moxie/ffi.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
- ffi.c - Copyright (C) 2012 Anthony Green
+ ffi.c - Copyright (C) 2012, 2013 Anthony Green
Moxie Foreign Function Interface
@@ -43,6 +43,12 @@ void *ffi_prep_args(char *stack, extended_cif *ecif)
p_argv = ecif->avalue;
argp = stack;
+ if (ecif->cif->rtype->type == FFI_TYPE_STRUCT)
+ {
+ *(void **) argp = ecif->rvalue;
+ argp += 4;
+ }
+
for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
(i != 0);
i--, p_arg++)
@@ -136,8 +142,7 @@ void ffi_call(ffi_cif *cif,
}
else
ecif.rvalue = rvalue;
-
-
+
switch (cif->abi)
{
case FFI_EABI:
@@ -154,19 +159,25 @@ void ffi_closure_eabi (unsigned arg1, unsigned arg2, unsigned arg3,
unsigned arg4, unsigned arg5, unsigned arg6)
{
/* This function is called by a trampoline. The trampoline stows a
- pointer to the ffi_closure object in gr7. We must save this
+ pointer to the ffi_closure object in $r7. We must save this
pointer in a place that will persist while we do our work. */
- register ffi_closure *creg __asm__ ("$r7");
+ register ffi_closure *creg __asm__ ("$r12");
ffi_closure *closure = creg;
/* Arguments that don't fit in registers are found on the stack
at a fixed offset above the current frame pointer. */
register char *frame_pointer __asm__ ("$fp");
- char *stack_args = frame_pointer + 16;
+
+ /* Pointer to a struct return value. */
+ void *struct_rvalue = (void *) arg1;
+
+ /* 6 words reserved for register args + 3 words from jsr */
+ char *stack_args = frame_pointer + 9*4;
/* Lay the register arguments down in a continuous chunk of memory. */
unsigned register_args[6] =
{ arg1, arg2, arg3, arg4, arg5, arg6 };
+ char *register_args_ptr = (char *) register_args;
ffi_cif *cif = closure->cif;
ffi_type **arg_types = cif->arg_types;
@@ -174,6 +185,12 @@ void ffi_closure_eabi (unsigned arg1, unsigned arg2, unsigned arg3,
char *ptr = (char *) register_args;
int i;
+ /* preserve struct type return pointer passing */
+ if ((cif->rtype != NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) {
+ ptr += 4;
+ register_args_ptr = (char *)®ister_args[1];
+ }
+
/* Find the address of each argument. */
for (i = 0; i < cif->nargs; i++)
{
@@ -190,6 +207,7 @@ void ffi_closure_eabi (unsigned arg1, unsigned arg2, unsigned arg3,
case FFI_TYPE_SINT32:
case FFI_TYPE_UINT32:
case FFI_TYPE_FLOAT:
+ case FFI_TYPE_POINTER:
avalue[i] = ptr;
break;
case FFI_TYPE_STRUCT:
@@ -205,30 +223,21 @@ void ffi_closure_eabi (unsigned arg1, unsigned arg2, unsigned arg3,
/* If we've handled more arguments than fit in registers,
start looking at the those passed on the stack. */
- if (ptr == ((char *)register_args + (6*4)))
+ if (ptr == ®ister_args[6])
ptr = stack_args;
}
/* Invoke the closure. */
- if (cif->rtype->type == FFI_TYPE_STRUCT)
+ if (cif->rtype && (cif->rtype->type == FFI_TYPE_STRUCT))
{
- /* The caller allocates space for the return structure, and
- passes a pointer to this space in gr3. Use this value directly
- as the return value. */
- register void *return_struct_ptr __asm__("$r0");
- (closure->fun) (cif, return_struct_ptr, avalue, closure->user_data);
+ (closure->fun) (cif, struct_rvalue, avalue, closure->user_data);
}
else
{
/* Allocate space for the return value and call the function. */
long long rvalue;
(closure->fun) (cif, &rvalue, avalue, closure->user_data);
-
- /* Functions return 4-byte or smaller results in gr8. 8-byte
- values also use gr9. We fill the both, even for small return
- values, just to avoid a branch. */ /*
- asm ("ldi @(%0, #0), gr8" : : "r" (&rvalue));
- asm ("ldi @(%0, #0), gr9" : : "r" (&((int *) &rvalue)[1])); */
+ asm ("mov $r12, %0\n ld.l $r0, ($r12)\n ldo.l $r1, 4($r12)" : : "r" (&rvalue));
}
}
@@ -239,18 +248,21 @@ ffi_prep_closure_loc (ffi_closure* closure,
void *user_data,
void *codeloc)
{
- unsigned int *tramp = (unsigned int *) &closure->tramp[0];
+ unsigned short *tramp = (unsigned short *) &closure->tramp[0];
unsigned long fn = (long) ffi_closure_eabi;
unsigned long cls = (long) codeloc;
- int i;
+
+ if (cif->abi != FFI_EABI)
+ return FFI_BAD_ABI;
fn = (unsigned long) ffi_closure_eabi;
- tramp[0] = 0x8cfc0000 + (fn & 0xffff); /* setlos lo(fn), gr6 */
- tramp[1] = 0x8efc0000 + (cls & 0xffff); /* setlos lo(cls), gr7 */
- tramp[2] = 0x8cf80000 + (fn >> 16); /* sethi hi(fn), gr6 */
- tramp[3] = 0x8ef80000 + (cls >> 16); /* sethi hi(cls), gr7 */
- tramp[4] = 0x80300006; /* jmpl @(gr0, gr6) */
+ tramp[0] = 0x01e0; /* ldi.l $r7, .... */
+ tramp[1] = cls >> 16;
+ tramp[2] = cls & 0xffff;
+ tramp[3] = 0x1a00; /* jmpa .... */
+ tramp[4] = fn >> 16;
+ tramp[5] = fn & 0xffff;
closure->cif = cif;
closure->fun = fun;
diff --git a/src/moxie/ffitarget.h b/src/moxie/ffitarget.h
index 93fae39..623e3ec 100644
--- a/src/moxie/ffitarget.h
+++ b/src/moxie/ffitarget.h
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------*-C-*-
- ffitarget.h - Copyright (c) 2012 Anthony Green
+ ffitarget.h - Copyright (c) 2012, 2013 Anthony Green
Target configuration macros for Moxie
Permission is hereby granted, free of charge, to any person obtaining
@@ -35,12 +35,8 @@ typedef signed long ffi_sarg;
typedef enum ffi_abi {
FFI_FIRST_ABI = 0,
-
-#ifdef MOXIE
FFI_EABI,
FFI_DEFAULT_ABI = FFI_EABI,
-#endif
-
FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
} ffi_abi;
#endif
@@ -50,7 +46,7 @@ typedef enum ffi_abi {
#define FFI_CLOSURES 1
#define FFI_NATIVE_RAW_API 0
-/* Trampolines are 5 4-byte instructions long. */
-#define FFI_TRAMPOLINE_SIZE (5*4)
+/* Trampolines are 12-bytes long. See ffi_prep_closure_loc. */
+#define FFI_TRAMPOLINE_SIZE (12)
#endif
diff --git a/testsuite/libffi.call/huge_struct.c b/testsuite/libffi.call/huge_struct.c
index 365ed95..657fe54 100644
--- a/testsuite/libffi.call/huge_struct.c
+++ b/testsuite/libffi.call/huge_struct.c
@@ -8,6 +8,7 @@
/* { dg-excess-errors "" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
+/* { dg-options -Wformat=0 { target moxie*-*-elf } } */
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
#include "ffitest.h"
diff --git a/testsuite/libffi.call/return_dbl.c b/testsuite/libffi.call/return_dbl.c
index 1aab403..fd07e50 100644
--- a/testsuite/libffi.call/return_dbl.c
+++ b/testsuite/libffi.call/return_dbl.c
@@ -9,6 +9,7 @@
static double return_dbl(double dbl)
{
+ printf ("%f\n", dbl);
return 2 * dbl;
}
int main (void)
diff --git a/testsuite/libffi.special/unwindtest.cc b/testsuite/libffi.special/unwindtest.cc
index d7ffd4a..a78f4e7 100644
--- a/testsuite/libffi.special/unwindtest.cc
+++ b/testsuite/libffi.special/unwindtest.cc
@@ -5,6 +5,7 @@
Originator: Jeff Sturm <jsturm@one-point.com> */
/* { dg-do run } */
+
#include "ffitestcxx.h"
#if defined HAVE_STDINT_H
diff --git a/testsuite/libffi.special/unwindtest_ffi_call.cc b/testsuite/libffi.special/unwindtest_ffi_call.cc
index 29739cd..57191f2 100644
--- a/testsuite/libffi.special/unwindtest_ffi_call.cc
+++ b/testsuite/libffi.special/unwindtest_ffi_call.cc
@@ -5,6 +5,7 @@
Originator: Andreas Tobler <andreast@gcc.gnu.org> 20061213 */
/* { dg-do run } */
+
#include "ffitestcxx.h"
static int checking(int a __UNUSED__, short b __UNUSED__,