Elbrus 2K support

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Elbrus 2K support

Max Lapshin-2

Hi.

We have successfully compiled erlang 19.0 under Elbrus 2K.  It is russian computer with VLIW architecture and transparent support for amd64 instructions execution.

$ uname -a

Linux EL2S4-53-31 3.14.46-elbrus.314.1.14 #1 SMP Mon Sep 21 22:13:08 GMT 2015 e2k E2S EL2S4 GNU/Linux



Right now we have tested how it works in amd64 emulation and had to make some trivial hacks for it to compile (patch in the end of email), because compiler is lcc:

$ lcc -v

lcc:1.20.09:Aug-27-2015:e2k-4c-linux

Thread model: posix

gcc version 4.4.0 compatible.


Stackoverflow couldn't help us with compiling under elbrus, so I decided to make two dirty patches =)


Erlang and thus our Flussonic can run on this architecture. Thank you for portable code!





diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c
index ff7746c..e83c762 100644
--- a/erts/emulator/beam/erl_bif_re.c
+++ b/erts/emulator/beam/erl_bif_re.c
@@ -31,7 +31,7 @@
 #include "big.h"
 #define ERLANG_INTEGRATION 1
 #define PCRE_STATIC
-#include "pcre.h"
+#include "../pcre/pcre.h"
 
 #define PCRE_DEFAULT_COMPILE_OPTS 0 
 #define PCRE_DEFAULT_EXEC_OPTS 0 
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index dfe82ca..872a7df 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -235,7 +235,7 @@ __decl_noreturn void __noreturn erl_assert_error(const char* expr, const char *f
  * Compile time assert
  * (the actual compiler error msg can be a bit confusing)
  */
-#if ERTS_AT_LEAST_GCC_VSN__(3,1,1)
+#if false && ERTS_AT_LEAST_GCC_VSN__(3,1,1)
 # define ERTS_CT_ASSERT(e) \
     do { \
  enum { compile_time_assert__ = __builtin_choose_expr((e),0,(void)0) }; \








_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Elbrus 2K support

Alex Arnon
Very very cool!!!

Do they still make SPARC compatible machines?
Where are Elbrus machines used? Have they achieved a wide distribution?

On Thu, Nov 3, 2016 at 2:47 PM, Max Lapshin <[hidden email]> wrote:

Hi.

We have successfully compiled erlang 19.0 under Elbrus 2K.  It is russian computer with VLIW architecture and transparent support for amd64 instructions execution.

$ uname -a

Linux EL2S4-53-31 3.14.46-elbrus.314.1.14 #1 SMP Mon Sep 21 22:13:08 GMT 2015 e2k E2S EL2S4 GNU/Linux



Right now we have tested how it works in amd64 emulation and had to make some trivial hacks for it to compile (patch in the end of email), because compiler is lcc:

$ lcc -v

lcc:1.20.09:Aug-27-2015:e2k-4c-linux

Thread model: posix

gcc version 4.4.0 compatible.


Stackoverflow couldn't help us with compiling under elbrus, so I decided to make two dirty patches =)


Erlang and thus our Flussonic can run on this architecture. Thank you for portable code!





diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c
index ff7746c..e83c762 100644
--- a/erts/emulator/beam/erl_bif_re.c
+++ b/erts/emulator/beam/erl_bif_re.c
@@ -31,7 +31,7 @@
 #include "big.h"
 #define ERLANG_INTEGRATION 1
 #define PCRE_STATIC
-#include "pcre.h"
+#include "../pcre/pcre.h"
 
 #define PCRE_DEFAULT_COMPILE_OPTS 0 
 #define PCRE_DEFAULT_EXEC_OPTS 0 
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index dfe82ca..872a7df 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -235,7 +235,7 @@ __decl_noreturn void __noreturn erl_assert_error(const char* expr, const char *f
  * Compile time assert
  * (the actual compiler error msg can be a bit confusing)
  */
-#if ERTS_AT_LEAST_GCC_VSN__(3,1,1)
+#if false && ERTS_AT_LEAST_GCC_VSN__(3,1,1)
 # define ERTS_CT_ASSERT(e) \
     do { \
  enum { compile_time_assert__ = __builtin_choose_expr((e),0,(void)0) }; \








_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Elbrus 2K support

Max Lapshin-2
As far as I understand, they are not related to Sparc anymore.   It was some time ago, but they have made progress and now it is different.


About usage: it is not very clear, because they are very young as a commercial product and haven't got wide distribution. But if you don't want NSA backdoor, Elbrus is definitely worthy to look at =)

On Fri, Nov 4, 2016 at 12:52 PM, Alex Arnon <[hidden email]> wrote:
Very very cool!!!

Do they still make SPARC compatible machines?
Where are Elbrus machines used? Have they achieved a wide distribution?

On Thu, Nov 3, 2016 at 2:47 PM, Max Lapshin <[hidden email]> wrote:

Hi.

We have successfully compiled erlang 19.0 under Elbrus 2K.  It is russian computer with VLIW architecture and transparent support for amd64 instructions execution.

$ uname -a

Linux EL2S4-53-31 3.14.46-elbrus.314.1.14 #1 SMP Mon Sep 21 22:13:08 GMT 2015 e2k E2S EL2S4 GNU/Linux



Right now we have tested how it works in amd64 emulation and had to make some trivial hacks for it to compile (patch in the end of email), because compiler is lcc:

$ lcc -v

lcc:1.20.09:Aug-27-2015:e2k-4c-linux

Thread model: posix

gcc version 4.4.0 compatible.


Stackoverflow couldn't help us with compiling under elbrus, so I decided to make two dirty patches =)


Erlang and thus our Flussonic can run on this architecture. Thank you for portable code!





diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c
index ff7746c..e83c762 100644
--- a/erts/emulator/beam/erl_bif_re.c
+++ b/erts/emulator/beam/erl_bif_re.c
@@ -31,7 +31,7 @@
 #include "big.h"
 #define ERLANG_INTEGRATION 1
 #define PCRE_STATIC
-#include "pcre.h"
+#include "../pcre/pcre.h"
 
 #define PCRE_DEFAULT_COMPILE_OPTS 0 
 #define PCRE_DEFAULT_EXEC_OPTS 0 
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index dfe82ca..872a7df 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -235,7 +235,7 @@ __decl_noreturn void __noreturn erl_assert_error(const char* expr, const char *f
  * Compile time assert
  * (the actual compiler error msg can be a bit confusing)
  */
-#if ERTS_AT_LEAST_GCC_VSN__(3,1,1)
+#if false && ERTS_AT_LEAST_GCC_VSN__(3,1,1)
 # define ERTS_CT_ASSERT(e) \
     do { \
  enum { compile_time_assert__ = __builtin_choose_expr((e),0,(void)0) }; \








_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions




_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Elbrus 2K support

Kostis Sagonas-2
On 11/04/2016 04:54 PM, Max Lapshin wrote:
>
> About usage: it is not very clear, because they are very young as a
> commercial product and haven't got wide distribution. But if you don't
> want NSA backdoor, Elbrus is definitely worthy to look at =)

And which backdoor do you get instead? :)

Kostis
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Elbrus 2K support

Vans S
You get putin in your backdoor. Think that might be worded wrong..



On Friday, November 4, 2016 12:19 PM, Kostis Sagonas <[hidden email]> wrote:
On 11/04/2016 04:54 PM, Max Lapshin wrote:
>
> About usage: it is not very clear, because they are very young as a
> commercial product and haven't got wide distribution. But if you don't
> want NSA backdoor, Elbrus is definitely worthy to look at =)

And which backdoor do you get instead? :)

Kostis

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Elbrus 2K support

Alex Arnon
In reply to this post by Kostis Sagonas-2
I wonder! :)


On Fri, Nov 4, 2016 at 6:18 PM, Kostis Sagonas <[hidden email]> wrote:
On 11/04/2016 04:54 PM, Max Lapshin wrote:

About usage: it is not very clear, because they are very young as a
commercial product and haven't got wide distribution. But if you don't
want NSA backdoor, Elbrus is definitely worthy to look at =)

And which backdoor do you get instead? :)

Kostis

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions