1 /* Assembler interface for targets using CGEN. -*- C -*-
2 CGEN: Cpu tools GENerator
4 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 - the resultant file is machine generated, cgen-asm.in isn't
7 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005
8 Free Software Foundation, Inc.
10 This file is part of the GNU Binutils and GDB, the GNU debugger.
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2, or (at your option)
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software Foundation, Inc.,
24 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
26 /* ??? Eventually more and more of this stuff can go to cpu-independent files.
34 #include "ip2k-desc.h"
38 #include "libiberty.h"
39 #include "safe-ctype.h"
42 #define min(a,b) ((a) < (b) ? (a) : (b))
44 #define max(a,b) ((a) > (b) ? (a) : (b))
46 static const char * parse_insn_normal
47 (CGEN_CPU_DESC
, const CGEN_INSN
*, const char **, CGEN_FIELDS
*);
49 /* -- assembler routines inserted here. */
54 parse_fr (CGEN_CPU_DESC cd
,
57 unsigned long *valuep
)
62 enum cgen_parse_operand_result result_type
;
64 extern CGEN_KEYWORD ip2k_cgen_opval_register_names
;
70 /* Check here to see if you're about to try parsing a w as the first arg
71 and return an error if you are. */
72 if ((strncmp (*strp
, "w", 1) == 0) || (strncmp (*strp
, "W", 1) == 0))
76 if ((strncmp (*strp
, ",", 1) == 0) || ISSPACE (**strp
))
78 /* We've been passed a w. Return with an error message so that
79 cgen will try the next parsing option. */
80 errmsg
= _("W keyword invalid in FR operand slot.");
86 /* Attempt parse as register keyword. */
87 errmsg
= cgen_parse_keyword (cd
, strp
, & ip2k_cgen_opval_register_names
,
93 /* Attempt to parse for "(IP)". */
94 afteroffset
= strstr (*strp
, "(IP)");
96 if (afteroffset
== NULL
)
97 /* Make sure it's not in lower case. */
98 afteroffset
= strstr (*strp
, "(ip)");
100 if (afteroffset
!= NULL
)
102 if (afteroffset
!= *strp
)
104 /* Invalid offset present. */
105 errmsg
= _("offset(IP) is not a valid form");
117 /* Attempt to parse for DP. ex: mov w, offset(DP)
120 /* Try parsing it as an address and see what comes back. */
121 afteroffset
= strstr (*strp
, "(DP)");
123 if (afteroffset
== NULL
)
124 /* Maybe it's in lower case. */
125 afteroffset
= strstr (*strp
, "(dp)");
127 if (afteroffset
!= NULL
)
129 if (afteroffset
== *strp
)
131 /* No offset present. Use 0 by default. */
136 errmsg
= cgen_parse_address (cd
, strp
, opindex
,
137 BFD_RELOC_IP2K_FR_OFFSET
,
138 & result_type
, & tempvalue
);
142 if (tempvalue
<= 127)
144 /* Value is ok. Fix up the first 2 bits and return. */
145 *valuep
= 0x0100 | tempvalue
;
146 *strp
+= 4; /* Skip over the (DP) in *strp. */
151 /* Found something there in front of (DP) but it's out
153 errmsg
= _("(DP) offset out of range.");
160 /* Attempt to parse for SP. ex: mov w, offset(SP)
161 mov offset(SP), w. */
162 afteroffset
= strstr (*strp
, "(SP)");
164 if (afteroffset
== NULL
)
165 /* Maybe it's in lower case. */
166 afteroffset
= strstr (*strp
, "(sp)");
168 if (afteroffset
!= NULL
)
170 if (afteroffset
== *strp
)
172 /* No offset present. Use 0 by default. */
177 errmsg
= cgen_parse_address (cd
, strp
, opindex
,
178 BFD_RELOC_IP2K_FR_OFFSET
,
179 & result_type
, & tempvalue
);
183 if (tempvalue
<= 127)
185 /* Value is ok. Fix up the first 2 bits and return. */
186 *valuep
= 0x0180 | tempvalue
;
187 *strp
+= 4; /* Skip over the (SP) in *strp. */
192 /* Found something there in front of (SP) but it's out
194 errmsg
= _("(SP) offset out of range.");
200 /* Attempt to parse as an address. */
202 errmsg
= cgen_parse_address (cd
, strp
, opindex
, BFD_RELOC_IP2K_FR9
,
203 & result_type
, & value
);
208 /* If a parenthesis is found, warn about invalid form. */
210 errmsg
= _("illegal use of parentheses");
212 /* If a numeric value is specified, ensure that it is between
214 else if (result_type
== CGEN_PARSE_OPERAND_RESULT_NUMBER
)
216 if (value
< 0x1 || value
> 0xff)
217 errmsg
= _("operand out of range (not between 1 and 255)");
224 parse_addr16 (CGEN_CPU_DESC cd
,
227 unsigned long *valuep
)
230 enum cgen_parse_operand_result result_type
;
231 bfd_reloc_code_real_type code
= BFD_RELOC_NONE
;
234 if (opindex
== (CGEN_OPERAND_TYPE
) IP2K_OPERAND_ADDR16H
)
235 code
= BFD_RELOC_IP2K_HI8DATA
;
236 else if (opindex
== (CGEN_OPERAND_TYPE
) IP2K_OPERAND_ADDR16L
)
237 code
= BFD_RELOC_IP2K_LO8DATA
;
240 /* Something is very wrong. opindex has to be one of the above. */
241 errmsg
= _("parse_addr16: invalid opindex.");
245 errmsg
= cgen_parse_address (cd
, strp
, opindex
, code
,
246 & result_type
, & value
);
249 /* We either have a relocation or a number now. */
250 if (result_type
== CGEN_PARSE_OPERAND_RESULT_NUMBER
)
252 /* We got a number back. */
253 if (code
== BFD_RELOC_IP2K_HI8DATA
)
256 /* code = BFD_RELOC_IP2K_LOW8DATA. */
266 parse_addr16_cjp (CGEN_CPU_DESC cd
,
269 unsigned long *valuep
)
272 enum cgen_parse_operand_result result_type
;
273 bfd_reloc_code_real_type code
= BFD_RELOC_NONE
;
276 if (opindex
== (CGEN_OPERAND_TYPE
) IP2K_OPERAND_ADDR16CJP
)
277 code
= BFD_RELOC_IP2K_ADDR16CJP
;
278 else if (opindex
== (CGEN_OPERAND_TYPE
) IP2K_OPERAND_ADDR16P
)
279 code
= BFD_RELOC_IP2K_PAGE3
;
281 errmsg
= cgen_parse_address (cd
, strp
, opindex
, code
,
282 & result_type
, & value
);
285 if (result_type
== CGEN_PARSE_OPERAND_RESULT_NUMBER
)
287 if ((value
& 0x1) == 0) /* If the address is even .... */
289 if (opindex
== (CGEN_OPERAND_TYPE
) IP2K_OPERAND_ADDR16CJP
)
290 *valuep
= (value
>> 1) & 0x1FFF; /* Should mask be 1FFF? */
291 else if (opindex
== (CGEN_OPERAND_TYPE
) IP2K_OPERAND_ADDR16P
)
292 *valuep
= (value
>> 14) & 0x7;
295 errmsg
= _("Byte address required. - must be even.");
297 else if (result_type
== CGEN_PARSE_OPERAND_RESULT_QUEUED
)
299 /* This will happen for things like (s2-s1) where s2 and s1
304 errmsg
= _("cgen_parse_address returned a symbol. Literal required.");
310 parse_lit8 (CGEN_CPU_DESC cd
,
316 enum cgen_parse_operand_result result_type
;
317 bfd_reloc_code_real_type code
= BFD_RELOC_NONE
;
320 /* Parse %OP relocating operators. */
321 if (strncmp (*strp
, "%bank", 5) == 0)
324 code
= BFD_RELOC_IP2K_BANK
;
326 else if (strncmp (*strp
, "%lo8data", 8) == 0)
329 code
= BFD_RELOC_IP2K_LO8DATA
;
331 else if (strncmp (*strp
, "%hi8data", 8) == 0)
334 code
= BFD_RELOC_IP2K_HI8DATA
;
336 else if (strncmp (*strp
, "%ex8data", 8) == 0)
339 code
= BFD_RELOC_IP2K_EX8DATA
;
341 else if (strncmp (*strp
, "%lo8insn", 8) == 0)
344 code
= BFD_RELOC_IP2K_LO8INSN
;
346 else if (strncmp (*strp
, "%hi8insn", 8) == 0)
349 code
= BFD_RELOC_IP2K_HI8INSN
;
352 /* Parse %op operand. */
353 if (code
!= BFD_RELOC_NONE
)
355 errmsg
= cgen_parse_address (cd
, strp
, opindex
, code
,
356 & result_type
, & value
);
357 if ((errmsg
== NULL
) &&
358 (result_type
!= CGEN_PARSE_OPERAND_RESULT_QUEUED
))
359 errmsg
= _("percent-operator operand is not a symbol");
363 /* Parse as a number. */
366 errmsg
= cgen_parse_signed_integer (cd
, strp
, opindex
, valuep
);
368 /* Truncate to eight bits to accept both signed and unsigned input. */
377 parse_bit3 (CGEN_CPU_DESC cd
,
380 unsigned long *valuep
)
387 if (strncmp (*strp
, "%bit", 4) == 0)
392 else if (strncmp (*strp
, "%msbbit", 7) == 0)
397 else if (strncmp (*strp
, "%lsbbit", 7) == 0)
403 errmsg
= cgen_parse_unsigned_integer (cd
, strp
, opindex
, valuep
);
412 errmsg
= _("Attempt to find bit index of 0");
419 while ((value
& 0x80000000) == 0)
428 while ((value
& 0x00000001) == 0)
443 const char * ip2k_cgen_parse_operand
444 (CGEN_CPU_DESC
, int, const char **, CGEN_FIELDS
*);
446 /* Main entry point for operand parsing.
448 This function is basically just a big switch statement. Earlier versions
449 used tables to look up the function to use, but
450 - if the table contains both assembler and disassembler functions then
451 the disassembler contains much of the assembler and vice-versa,
452 - there's a lot of inlining possibilities as things grow,
453 - using a switch statement avoids the function call overhead.
455 This function could be moved into `parse_insn_normal', but keeping it
456 separate makes clear the interface between `parse_insn_normal' and each of
460 ip2k_cgen_parse_operand (CGEN_CPU_DESC cd
,
463 CGEN_FIELDS
* fields
)
465 const char * errmsg
= NULL
;
466 /* Used by scalar operands that still need to be parsed. */
467 long junk ATTRIBUTE_UNUSED
;
471 case IP2K_OPERAND_ADDR16CJP
:
472 errmsg
= parse_addr16_cjp (cd
, strp
, IP2K_OPERAND_ADDR16CJP
, (unsigned long *) (& fields
->f_addr16cjp
));
474 case IP2K_OPERAND_ADDR16H
:
475 errmsg
= parse_addr16 (cd
, strp
, IP2K_OPERAND_ADDR16H
, (unsigned long *) (& fields
->f_imm8
));
477 case IP2K_OPERAND_ADDR16L
:
478 errmsg
= parse_addr16 (cd
, strp
, IP2K_OPERAND_ADDR16L
, (unsigned long *) (& fields
->f_imm8
));
480 case IP2K_OPERAND_ADDR16P
:
481 errmsg
= parse_addr16_cjp (cd
, strp
, IP2K_OPERAND_ADDR16P
, (unsigned long *) (& fields
->f_page3
));
483 case IP2K_OPERAND_BITNO
:
484 errmsg
= parse_bit3 (cd
, strp
, IP2K_OPERAND_BITNO
, (unsigned long *) (& fields
->f_bitno
));
486 case IP2K_OPERAND_CBIT
:
487 errmsg
= cgen_parse_unsigned_integer (cd
, strp
, IP2K_OPERAND_CBIT
, (unsigned long *) (& junk
));
489 case IP2K_OPERAND_DCBIT
:
490 errmsg
= cgen_parse_unsigned_integer (cd
, strp
, IP2K_OPERAND_DCBIT
, (unsigned long *) (& junk
));
492 case IP2K_OPERAND_FR
:
493 errmsg
= parse_fr (cd
, strp
, IP2K_OPERAND_FR
, (unsigned long *) (& fields
->f_reg
));
495 case IP2K_OPERAND_LIT8
:
496 errmsg
= parse_lit8 (cd
, strp
, IP2K_OPERAND_LIT8
, (long *) (& fields
->f_imm8
));
498 case IP2K_OPERAND_PABITS
:
499 errmsg
= cgen_parse_unsigned_integer (cd
, strp
, IP2K_OPERAND_PABITS
, (unsigned long *) (& junk
));
501 case IP2K_OPERAND_RETI3
:
502 errmsg
= cgen_parse_unsigned_integer (cd
, strp
, IP2K_OPERAND_RETI3
, (unsigned long *) (& fields
->f_reti3
));
504 case IP2K_OPERAND_ZBIT
:
505 errmsg
= cgen_parse_unsigned_integer (cd
, strp
, IP2K_OPERAND_ZBIT
, (unsigned long *) (& junk
));
509 /* xgettext:c-format */
510 fprintf (stderr
, _("Unrecognized field %d while parsing.\n"), opindex
);
517 cgen_parse_fn
* const ip2k_cgen_parse_handlers
[] =
523 ip2k_cgen_init_asm (CGEN_CPU_DESC cd
)
525 ip2k_cgen_init_opcode_table (cd
);
526 ip2k_cgen_init_ibld_table (cd
);
527 cd
->parse_handlers
= & ip2k_cgen_parse_handlers
[0];
528 cd
->parse_operand
= ip2k_cgen_parse_operand
;
529 #ifdef CGEN_ASM_INIT_HOOK
536 /* Regex construction routine.
538 This translates an opcode syntax string into a regex string,
539 by replacing any non-character syntax element (such as an
540 opcode) with the pattern '.*'
542 It then compiles the regex and stores it in the opcode, for
543 later use by ip2k_cgen_assemble_insn
545 Returns NULL for success, an error message for failure. */
548 ip2k_cgen_build_insn_regex (CGEN_INSN
*insn
)
550 CGEN_OPCODE
*opc
= (CGEN_OPCODE
*) CGEN_INSN_OPCODE (insn
);
551 const char *mnem
= CGEN_INSN_MNEMONIC (insn
);
552 char rxbuf
[CGEN_MAX_RX_ELEMENTS
];
554 const CGEN_SYNTAX_CHAR_TYPE
*syn
;
557 syn
= CGEN_SYNTAX_STRING (CGEN_OPCODE_SYNTAX (opc
));
559 /* Mnemonics come first in the syntax string. */
560 if (! CGEN_SYNTAX_MNEMONIC_P (* syn
))
561 return _("missing mnemonic in syntax string");
564 /* Generate a case sensitive regular expression that emulates case
565 insensitive matching in the "C" locale. We cannot generate a case
566 insensitive regular expression because in Turkish locales, 'i' and 'I'
567 are not equal modulo case conversion. */
569 /* Copy the literal mnemonic out of the insn. */
570 for (; *mnem
; mnem
++)
585 /* Copy any remaining literals from the syntax string into the rx. */
586 for(; * syn
!= 0 && rx
<= rxbuf
+ (CGEN_MAX_RX_ELEMENTS
- 7 - 4); ++syn
)
588 if (CGEN_SYNTAX_CHAR_P (* syn
))
590 char c
= CGEN_SYNTAX_CHAR (* syn
);
594 /* Escape any regex metacharacters in the syntax. */
595 case '.': case '[': case '\\':
596 case '*': case '^': case '$':
598 #ifdef CGEN_ESCAPE_EXTENDED_REGEX
599 case '?': case '{': case '}':
600 case '(': case ')': case '*':
601 case '|': case '+': case ']':
622 /* Replace non-syntax fields with globs. */
628 /* Trailing whitespace ok. */
635 /* But anchor it after that. */
639 CGEN_INSN_RX (insn
) = xmalloc (sizeof (regex_t
));
640 reg_err
= regcomp ((regex_t
*) CGEN_INSN_RX (insn
), rxbuf
, REG_NOSUB
);
648 regerror (reg_err
, (regex_t
*) CGEN_INSN_RX (insn
), msg
, 80);
649 regfree ((regex_t
*) CGEN_INSN_RX (insn
));
650 free (CGEN_INSN_RX (insn
));
651 (CGEN_INSN_RX (insn
)) = NULL
;
657 /* Default insn parser.
659 The syntax string is scanned and operands are parsed and stored in FIELDS.
660 Relocs are queued as we go via other callbacks.
662 ??? Note that this is currently an all-or-nothing parser. If we fail to
663 parse the instruction, we return 0 and the caller will start over from
664 the beginning. Backtracking will be necessary in parsing subexpressions,
665 but that can be handled there. Not handling backtracking here may get
666 expensive in the case of the m68k. Deal with later.
668 Returns NULL for success, an error message for failure. */
671 parse_insn_normal (CGEN_CPU_DESC cd
,
672 const CGEN_INSN
*insn
,
676 /* ??? Runtime added insns not handled yet. */
677 const CGEN_SYNTAX
*syntax
= CGEN_INSN_SYNTAX (insn
);
678 const char *str
= *strp
;
681 const CGEN_SYNTAX_CHAR_TYPE
* syn
;
682 #ifdef CGEN_MNEMONIC_OPERANDS
687 /* For now we assume the mnemonic is first (there are no leading operands).
688 We can parse it without needing to set up operand parsing.
689 GAS's input scrubber will ensure mnemonics are lowercase, but we may
690 not be called from GAS. */
691 p
= CGEN_INSN_MNEMONIC (insn
);
692 while (*p
&& TOLOWER (*p
) == TOLOWER (*str
))
696 return _("unrecognized instruction");
698 #ifndef CGEN_MNEMONIC_OPERANDS
699 if (* str
&& ! ISSPACE (* str
))
700 return _("unrecognized instruction");
703 CGEN_INIT_PARSE (cd
);
704 cgen_init_parse_operand (cd
);
705 #ifdef CGEN_MNEMONIC_OPERANDS
709 /* We don't check for (*str != '\0') here because we want to parse
710 any trailing fake arguments in the syntax string. */
711 syn
= CGEN_SYNTAX_STRING (syntax
);
713 /* Mnemonics come first for now, ensure valid string. */
714 if (! CGEN_SYNTAX_MNEMONIC_P (* syn
))
721 /* Non operand chars must match exactly. */
722 if (CGEN_SYNTAX_CHAR_P (* syn
))
724 /* FIXME: While we allow for non-GAS callers above, we assume the
725 first char after the mnemonic part is a space. */
726 /* FIXME: We also take inappropriate advantage of the fact that
727 GAS's input scrubber will remove extraneous blanks. */
728 if (TOLOWER (*str
) == TOLOWER (CGEN_SYNTAX_CHAR (* syn
)))
730 #ifdef CGEN_MNEMONIC_OPERANDS
731 if (CGEN_SYNTAX_CHAR(* syn
) == ' ')
739 /* Syntax char didn't match. Can't be this insn. */
740 static char msg
[80];
742 /* xgettext:c-format */
743 sprintf (msg
, _("syntax error (expected char `%c', found `%c')"),
744 CGEN_SYNTAX_CHAR(*syn
), *str
);
749 /* Ran out of input. */
750 static char msg
[80];
752 /* xgettext:c-format */
753 sprintf (msg
, _("syntax error (expected char `%c', found end of instruction)"),
754 CGEN_SYNTAX_CHAR(*syn
));
760 /* We have an operand of some sort. */
761 errmsg
= cd
->parse_operand (cd
, CGEN_SYNTAX_FIELD (*syn
),
766 /* Done with this operand, continue with next one. */
770 /* If we're at the end of the syntax string, we're done. */
773 /* FIXME: For the moment we assume a valid `str' can only contain
774 blanks now. IE: We needn't try again with a longer version of
775 the insn and it is assumed that longer versions of insns appear
776 before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
777 while (ISSPACE (* str
))
781 return _("junk at end of line"); /* FIXME: would like to include `str' */
786 /* We couldn't parse it. */
787 return _("unrecognized instruction");
791 This routine is called for each instruction to be assembled.
792 STR points to the insn to be assembled.
793 We assume all necessary tables have been initialized.
794 The assembled instruction, less any fixups, is stored in BUF.
795 Remember that if CGEN_INT_INSN_P then BUF is an int and thus the value
796 still needs to be converted to target byte order, otherwise BUF is an array
797 of bytes in target byte order.
798 The result is a pointer to the insn's entry in the opcode table,
799 or NULL if an error occured (an error message will have already been
802 Note that when processing (non-alias) macro-insns,
803 this function recurses.
805 ??? It's possible to make this cpu-independent.
806 One would have to deal with a few minor things.
807 At this point in time doing so would be more of a curiosity than useful
808 [for example this file isn't _that_ big], but keeping the possibility in
809 mind helps keep the design clean. */
812 ip2k_cgen_assemble_insn (CGEN_CPU_DESC cd
,
815 CGEN_INSN_BYTES_PTR buf
,
819 CGEN_INSN_LIST
*ilist
;
820 const char *parse_errmsg
= NULL
;
821 const char *insert_errmsg
= NULL
;
822 int recognized_mnemonic
= 0;
824 /* Skip leading white space. */
825 while (ISSPACE (* str
))
828 /* The instructions are stored in hashed lists.
829 Get the first in the list. */
830 ilist
= CGEN_ASM_LOOKUP_INSN (cd
, str
);
832 /* Keep looking until we find a match. */
834 for ( ; ilist
!= NULL
; ilist
= CGEN_ASM_NEXT_INSN (ilist
))
836 const CGEN_INSN
*insn
= ilist
->insn
;
837 recognized_mnemonic
= 1;
839 #ifdef CGEN_VALIDATE_INSN_SUPPORTED
840 /* Not usually needed as unsupported opcodes
841 shouldn't be in the hash lists. */
842 /* Is this insn supported by the selected cpu? */
843 if (! ip2k_cgen_insn_supported (cd
, insn
))
846 /* If the RELAXED attribute is set, this is an insn that shouldn't be
847 chosen immediately. Instead, it is used during assembler/linker
848 relaxation if possible. */
849 if (CGEN_INSN_ATTR_VALUE (insn
, CGEN_INSN_RELAXED
) != 0)
854 /* Skip this insn if str doesn't look right lexically. */
855 if (CGEN_INSN_RX (insn
) != NULL
&&
856 regexec ((regex_t
*) CGEN_INSN_RX (insn
), str
, 0, NULL
, 0) == REG_NOMATCH
)
859 /* Allow parse/insert handlers to obtain length of insn. */
860 CGEN_FIELDS_BITSIZE (fields
) = CGEN_INSN_BITSIZE (insn
);
862 parse_errmsg
= CGEN_PARSE_FN (cd
, insn
) (cd
, insn
, & str
, fields
);
863 if (parse_errmsg
!= NULL
)
866 /* ??? 0 is passed for `pc'. */
867 insert_errmsg
= CGEN_INSERT_FN (cd
, insn
) (cd
, insn
, fields
, buf
,
869 if (insert_errmsg
!= NULL
)
872 /* It is up to the caller to actually output the insn and any
878 static char errbuf
[150];
879 #ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
880 const char *tmp_errmsg
;
882 /* If requesting verbose error messages, use insert_errmsg.
883 Failing that, use parse_errmsg. */
884 tmp_errmsg
= (insert_errmsg
? insert_errmsg
:
885 parse_errmsg
? parse_errmsg
:
886 recognized_mnemonic
?
887 _("unrecognized form of instruction") :
888 _("unrecognized instruction"));
890 if (strlen (start
) > 50)
891 /* xgettext:c-format */
892 sprintf (errbuf
, "%s `%.50s...'", tmp_errmsg
, start
);
894 /* xgettext:c-format */
895 sprintf (errbuf
, "%s `%.50s'", tmp_errmsg
, start
);
897 if (strlen (start
) > 50)
898 /* xgettext:c-format */
899 sprintf (errbuf
, _("bad instruction `%.50s...'"), start
);
901 /* xgettext:c-format */
902 sprintf (errbuf
, _("bad instruction `%.50s'"), start
);