Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f814cf87
Commit
f814cf87
authored
Mar 23, 2003
by
Christian Costa
Committed by
Alexandre Julliard
Mar 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make use of .half and/or .asciiz assembler keywords when necessary.
parent
992d1b99
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
154 additions
and
11 deletions
+154
-11
configure
configure
+119
-1
configure.ac
configure.ac
+24
-2
config.h.in
include/config.h.in
+6
-3
spec32.c
tools/winebuild/spec32.c
+5
-5
No files found.
configure
View file @
f814cf87
...
...
@@ -11141,7 +11141,125 @@ if test "$ac_cv_c_asm_string" = "yes"
then
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_ASM_STRING 1
#define __ASM_STRING ".string"
_ACEOF
else
echo
"
$as_me
:
$LINENO
: checking whether assembler accepts .asciz"
>
&5
echo
$ECHO_N
"checking whether assembler accepts .asciz...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_c_asm_asciz
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
void ac_asm(void) { asm(".data\n\t.asciz \"test\"\n\t.text"); }
int
main ()
{
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_link
\"
"
)
>
&5
(
eval
$ac_link
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -s conftest$ac_exeext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_c_asm_asciz
=
"yes"
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
ac_cv_c_asm_asciz
=
"no"
fi
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
conftest.
$ac_ext
fi
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_c_asm_asciz
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_c_asm_asciz
"
>
&6
if
test
"
$ac_cv_c_asm_asciz
"
=
"yes"
then
cat
>>
confdefs.h
<<
\
_ACEOF
#define __ASM_STRING ".asciz"
_ACEOF
else
cat
>>
confdefs.h
<<
\
_ACEOF
#define __ASM_STRING ".ascii"
_ACEOF
fi
fi
echo
"
$as_me
:
$LINENO
: checking whether assembler accepts .short"
>
&5
echo
$ECHO_N
"checking whether assembler accepts .short...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_c_asm_short
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
#line
$LINENO
"configure"
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
void ac_asm(void) { asm(".data\n\t.short 1\n\t.text"); }
int
main ()
{
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_link
\"
"
)
>
&5
(
eval
$ac_link
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -s conftest$ac_exeext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_c_asm_short
=
"yes"
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
ac_cv_c_asm_short
=
"no"
fi
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
conftest.
$ac_ext
fi
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_c_asm_short
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_c_asm_short
"
>
&6
if
test
"
$ac_cv_c_asm_short
"
=
"yes"
then
cat
>>
confdefs.h
<<
\
_ACEOF
#define __ASM_SHORT ".short"
_ACEOF
else
cat
>>
confdefs.h
<<
\
_ACEOF
#define __ASM_SHORT ".half"
_ACEOF
fi
...
...
configure.ac
View file @
f814cf87
...
...
@@ -732,14 +732,36 @@ else
AC_DEFINE([__ASM_NAME(name)], [name])
fi
dnl **** Check
for .string
in assembler ****
dnl **** Check
how to do strings
in assembler ****
AC_CACHE_CHECK([whether assembler accepts .string], ac_cv_c_asm_string,
WINE_TRY_ASM_LINK([".data\n\t.string \"test\"\n\t.text"],,,
ac_cv_c_asm_string="yes",ac_cv_c_asm_string="no"))
if test "$ac_cv_c_asm_string" = "yes"
then
AC_DEFINE(HAVE_ASM_STRING, 1, [Define to use .string instead of .ascii])
AC_DEFINE(__ASM_STRING, [".string"], [Define to the assembler keyword used to specify an ASCII string])
else
AC_CACHE_CHECK([whether assembler accepts .asciz], ac_cv_c_asm_asciz,
WINE_TRY_ASM_LINK([".data\n\t.asciz \"test\"\n\t.text"],,,
ac_cv_c_asm_asciz="yes",ac_cv_c_asm_asciz="no"))
if test "$ac_cv_c_asm_asciz" = "yes"
then
AC_DEFINE(__ASM_STRING, [".asciz"])
else
AC_DEFINE(__ASM_STRING, [".ascii"])
fi
fi
dnl **** Check for .short in assembler ****
AC_CACHE_CHECK([whether assembler accepts .short], ac_cv_c_asm_short,
WINE_TRY_ASM_LINK([".data\n\t.short 1\n\t.text"],,,
ac_cv_c_asm_short="yes",ac_cv_c_asm_short="no"))
if test "$ac_cv_c_asm_short" = "yes"
then
AC_DEFINE(__ASM_SHORT, [".short"], [Define to the assembler keyword used to specify a word value])
else
AC_DEFINE(__ASM_SHORT, [".half"])
fi
dnl **** Check for working dll ****
...
...
include/config.h.in
View file @
f814cf87
...
...
@@ -35,9 +35,6 @@
/* Define if you have ARTS sound server */
#undef HAVE_ARTS
/* Define to use .string instead of .ascii */
#undef HAVE_ASM_STRING
/* Define to 1 if you have the <audio/audiolib.h> header file. */
#undef HAVE_AUDIO_AUDIOLIB_H
...
...
@@ -779,6 +776,12 @@
/* Define to a macro to generate an assembly name from a C symbol */
#undef __ASM_NAME
/* Define to the assembler keyword used to specify a word value */
#undef __ASM_SHORT
/* Define to the assembler keyword used to specify an ASCII string */
#undef __ASM_STRING
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
...
...
tools/winebuild/spec32.c
View file @
f814cf87
...
...
@@ -210,7 +210,7 @@ static int output_exports( FILE *outfile, int nr_exports )
fprintf
(
outfile
,
"
\"\\
t.text
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"
__wine_spec_exp_names:
\\
n
\"\n
"
);
for
(
i
=
0
;
i
<
nb_names
;
i
++
)
fprintf
(
outfile
,
"
\"\\
t"
STRING
"
\\\"
%s
\\\"\\
n
\"\n
"
,
Names
[
i
]
->
name
);
fprintf
(
outfile
,
"
\"\\
t"
__ASM_
STRING
"
\\\"
%s
\\\"\\
n
\"\n
"
,
Names
[
i
]
->
name
);
fprintf
(
outfile
,
"
\"\\
t.data
\\
n
\"\n
"
);
/* output the function ordinals */
...
...
@@ -218,12 +218,12 @@ static int output_exports( FILE *outfile, int nr_exports )
fprintf
(
outfile
,
"
\"
__wine_spec_exp_ordinals:
\\
n
\"\n
"
);
for
(
i
=
0
;
i
<
nb_names
;
i
++
)
{
fprintf
(
outfile
,
"
\"\\
t
.short
%d
\\
n
\"\n
"
,
Names
[
i
]
->
ordinal
-
Base
);
fprintf
(
outfile
,
"
\"\\
t
"
__ASM_SHORT
"
%d
\\
n
\"\n
"
,
Names
[
i
]
->
ordinal
-
Base
);
}
total_size
+=
nb_names
*
sizeof
(
short
);
if
(
nb_names
%
2
)
{
fprintf
(
outfile
,
"
\"\\
t
.short
0
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t
"
__ASM_SHORT
"
0
\\
n
\"\n
"
);
total_size
+=
sizeof
(
short
);
}
}
...
...
@@ -237,7 +237,7 @@ static int output_exports( FILE *outfile, int nr_exports )
{
ORDDEF
*
odp
=
Ordinals
[
i
];
if
(
odp
&&
(
odp
->
flags
&
FLAG_FORWARD
))
fprintf
(
outfile
,
"
\"\\
t"
STRING
"
\\\"
%s
\\\"\\
n
\"\n
"
,
odp
->
link_name
);
fprintf
(
outfile
,
"
\"\\
t"
__ASM_
STRING
"
\\\"
%s
\\\"\\
n
\"\n
"
,
odp
->
link_name
);
}
fprintf
(
outfile
,
"
\"\\
t.align %d
\\
n
\"\n
"
,
get_alignment
(
4
)
);
total_size
+=
(
fwd_size
+
3
)
&
~
3
;
...
...
@@ -281,7 +281,7 @@ static int output_exports( FILE *outfile, int nr_exports )
case
TYPE_CDECL
:
fprintf
(
outfile
,
"
\"\\
tjmp "
__ASM_NAME
(
"%s"
)
"
\\
n
\"\n
"
,
name
);
fprintf
(
outfile
,
"
\"\\
tret
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
t
.short
%d
\\
n
\"\n
"
,
args
);
fprintf
(
outfile
,
"
\"\\
t
"
__ASM_SHORT
"
%d
\\
n
\"\n
"
,
args
);
fprintf
(
outfile
,
"
\"\\
t.long "
__ASM_NAME
(
"%s"
)
",0x%08x
\\
n
\"\n
"
,
name
,
mask
);
break
;
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment