Linux-m68k Archive on lore.kernel.org
 help / color / Atom feed
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Debian m68k <debian-68k@lists.debian.org>
Cc: linux-m68k <linux-m68k@lists.linux-m68k.org>
Subject: LLVM for m68k completed (but not merged)
Date: Sun, 21 Jun 2020 22:12:04 +0200
Message-ID: <7840bdc7-db9c-8638-c462-bbe03d4c5545@physik.fu-berlin.de> (raw)

Hi!


I just received the news that the m68k backend for LLVM has been finished [1].

It has not been merged upstream yet (that will take some time), but it should
be usable now. I'm currently test-building it on Debian/m68k and it would probably
a good idea if more people give it a spin to help finding issues.

One issue I found is that CycleTimer has not been implemented. A quick fix is to
use the definition used by MIPS, i.e.:

diff --git a/llvm/utils/benchmark/src/cycleclock.h b/llvm/utils/benchmark/src/cycleclock.h
index 1b0f09359c9..88b7805faaf 100644
--- a/llvm/utils/benchmark/src/cycleclock.h
+++ b/llvm/utils/benchmark/src/cycleclock.h
@@ -161,7 +161,7 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
   struct timeval tv;
   gettimeofday(&tv, nullptr);
   return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
-#elif defined(__mips__)
+#elif defined(__mips__) || defined(__m68k__)
   // mips apparently only allows rdtsc for superusers, so we fall
   // back to gettimeofday.  It's possible clock_gettime would be better.
   struct timeval tv;

Thanks,
Adrian

> [1] https://github.com/M680x0/M680x0-mono-repo

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

             reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-21 20:12 John Paul Adrian Glaubitz [this message]
2020-06-23 15:34 ` John Paul Adrian Glaubitz
2020-06-24  1:07   ` Finn Thain
2020-06-24  7:42     ` John Paul Adrian Glaubitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7840bdc7-db9c-8638-c462-bbe03d4c5545@physik.fu-berlin.de \
    --to=glaubitz@physik.fu-berlin.de \
    --cc=debian-68k@lists.debian.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-m68k Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-m68k/0 linux-m68k/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-m68k linux-m68k/ https://lore.kernel.org/linux-m68k \
		linux-m68k@vger.kernel.org linux-m68k@lists.linux-m68k.org
	public-inbox-index linux-m68k

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-m68k


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git