summaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-02-12 17:14:23 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-13 00:42:36 +0100
commita391c8f0eef8573fd6b99e6cd264a5f2caa539cb (patch)
tree4e0835b958dcd51a59ab5a1bf652dec4ea2c544a /server.c
parent403007dc55222d4ca1120dd7730baa7579d12d88 (diff)
Introduce complex_alignof to replace word_size
Remove the concept of word_size since it is meaningless in some architectures. This is also done in preparation to possibly introduce 8-byte aligned messages. Message-Id: <Y+lkv0uMo/3+hbCb@jupiter.tail36e24.ts.net>
Diffstat (limited to 'server.c')
-rw-r--r--server.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/server.c b/server.c
index 95b0056..238e958 100644
--- a/server.c
+++ b/server.c
@@ -483,7 +483,7 @@ WriteCheckArgSize(FILE *file, const argument_t *arg)
arg->argLongForm ? ".msgtl_header" : "");
}
- if (btype->itTypeSize % word_size != 0)
+ if (btype->itTypeSize % complex_alignof != 0)
fprintf(file, "(");
if (multiplier > 1)
@@ -491,10 +491,10 @@ WriteCheckArgSize(FILE *file, const argument_t *arg)
fprintf(file, "In%dP->%s", arg->argRequestPos, count->argMsgField);
- /* If the base type size of the data field isn`t a multiple of word_size,
+ /* If the base type size of the data field isn`t a multiple of complex_alignof,
we have to round up. */
- if (btype->itTypeSize % word_size != 0)
- fprintf(file, " + %d) & ~%d", word_size - 1, word_size - 1);
+ if (btype->itTypeSize % complex_alignof != 0)
+ fprintf(file, " + %d) & ~%d", complex_alignof - 1, complex_alignof - 1);
if (ptype->itIndefinite) {
fprintf(file, " : sizeof(%s *)", FetchServerType(btype));
@@ -530,8 +530,8 @@ WriteCheckMsgSize(FILE *file, const argument_t *arg)
bool LastVarArg = arg->argRequestPos+1 == rt->rtNumRequestVar;
/* calculate the actual size in bytes of the data field. note
- that this quantity must be a multiple of word_size. hence, if
- the base type size isn't a multiple of word_size, we have to
+ that this quantity must be a multiple of complex_alignof. hence, if
+ the base type size isn't a multiple of complex_alignof, we have to
round up. note also that btype->itNumber must
divide btype->itTypeSize (see itCalculateSizeInfo). */
@@ -1090,7 +1090,7 @@ WriteArgSize(FILE *file, const argument_t *arg)
arg->argLongForm ? ".msgtl_header" : "");
}
- if (bsize % word_size != 0)
+ if (bsize % complex_alignof != 0)
fprintf(file, "(");
if (bsize > 1)
@@ -1103,11 +1103,11 @@ WriteArgSize(FILE *file, const argument_t *arg)
fprintf(file, "%s", count->argVarName);
/*
- * If the base type size is not a multiple of word_size,
+ * If the base type size is not a multiple of complex_alignof,
* we have to round up.
*/
- if (bsize % word_size != 0)
- fprintf(file, " + %d) & ~%d", word_size - 1, word_size - 1);
+ if (bsize % complex_alignof != 0)
+ fprintf(file, " + %d) & ~%d", complex_alignof - 1, complex_alignof - 1);
if (ptype->itIndefinite) {
fprintf(file, " : sizeof(%s *)",