From 555161d6643be0146d0477378210e5cd60c33892 Mon Sep 17 00:00:00 2001 From: sthen Date: Thu, 21 Mar 2013 22:23:39 +0000 Subject: [PATCH] use movw (not movl) with (16-bit) segment registers. cluebat from miod@ --- www/mongrel2/Makefile | 3 +- www/mongrel2/patches/patch-src_task_asm_S | 36 +++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 www/mongrel2/patches/patch-src_task_asm_S diff --git a/www/mongrel2/Makefile b/www/mongrel2/Makefile index 4e75e7b657f..7ca6538562e 100644 --- a/www/mongrel2/Makefile +++ b/www/mongrel2/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.8 2013/03/11 11:44:43 espie Exp $ +# $OpenBSD: Makefile,v 1.9 2013/03/21 22:23:39 sthen Exp $ # Some assembly required ONLY_FOR_ARCHS =i386 amd64 @@ -7,6 +7,7 @@ SHARED_ONLY = Yes COMMENT = language agnostic asynchronous web server DISTNAME = mongrel2-1.8.0 +REVISION = 0 CATEGORIES = www HOMEPAGE = http://mongrel2.org/ diff --git a/www/mongrel2/patches/patch-src_task_asm_S b/www/mongrel2/patches/patch-src_task_asm_S new file mode 100644 index 00000000000..c4938ae34fd --- /dev/null +++ b/www/mongrel2/patches/patch-src_task_asm_S @@ -0,0 +1,36 @@ +$OpenBSD: patch-src_task_asm_S,v 1.3 2013/03/21 22:23:40 sthen Exp $ + +use movw with (16-bit) segment registers. + +--- src/task/asm.S.orig Thu Mar 21 16:21:22 2013 ++++ src/task/asm.S Thu Mar 21 16:21:35 2013 +@@ -45,10 +45,10 @@ + SET: + movl 4(%esp), %eax + +- movl 8(%eax), %fs +- movl 12(%eax), %es +- movl 16(%eax), %ds +- movl 76(%eax), %ss ++ movw 8(%eax), %fs ++ movw 12(%eax), %es ++ movw 16(%eax), %ds ++ movw 76(%eax), %ss + movl 20(%eax), %edi + movl 24(%eax), %esi + movl 28(%eax), %ebp +@@ -65,10 +65,10 @@ SET: + GET: + movl 4(%esp), %eax + +- movl %fs, 8(%eax) +- movl %es, 12(%eax) +- movl %ds, 16(%eax) +- movl %ss, 76(%eax) ++ movw %fs, 8(%eax) ++ movw %es, 12(%eax) ++ movw %ds, 16(%eax) ++ movw %ss, 76(%eax) + movl %edi, 20(%eax) + movl %esi, 24(%eax) + movl %ebp, 28(%eax)